dataFrame.columns.stat — meanAbsError()
Description
The meanAbsError() method of the stat object computes the mean absolute error (MAE) between two selected columns.
Signature
dataFrame.columns(...columnNames).stat.meanAbsError()Argument
...columnNames( string[] )- The name of the columns from which to compute the mean absolute error.
Returns
mae(object)- The computed mean absolute error.
Notes
- The method requires exactly two selected columns.
- The first selected column is interpreted as the observed values.
- The second selected column is interpreted as the predicted values.
- The mean absolute error is the average absolute difference between corresponding observations.
- Lower values indicate better agreement between the two columns.
- A value of
0indicates a perfect match.
Example
// compute the MAE from values of 2 columns of the dataFrame
var mae = dataFrame.columns('actual', 'predicted').stat.meanAbsError();
// log the MAE
notebook.log(mae);