Hinweis:Dieser Abschnitt ist nur in englischer Sprache verfügbar. Wir bitten um Ihr Verständnis.
3.5.2.27 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 \(\{y_1, \ y_2,..., \ y_n\}\) and a observation dataset x \(\{x_1, \ x_2,..., \ x_n\}\), is given by:
\[MAE = \frac{ \sum_{i=1}^{n} |y_i-x_i| }{n}\]
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));