mae
Description
mae (Mean-Absolute-Error) function returns the mean of absolute error between a pair of vectors.
The MAE value between a prediction dataset y of n values
and a observation dataset x
, is given by:
/math-e106b494667295471dc357ca19cfa8b4.png)
Syntax
double mae(dataset vobs, dataset vpred)
Parameters
vobs
- Input, obsevation vector.
vpred
- Input, prediction vector.
Return
Return the mean absolute error of vector vobs and vpred.
Note: Missing data, masked data and text in vobs and vpred won't be counted.
Example
//Calculate the mean absolute error of column A and B. yr = mae(col(A),col(B));