mae

Computes Mean Absolute Error between two vectors. It is the average of the error (absolute error) made by the regression model, where the best value is 0 and the worst value tends to infinity (it increases as the deviation between predicted and actual value increases).

Attention: Available only with Twin Activate commercial edition.

Syntax

Score = mae(targets,predictions)

Inputs

targets
Actual label for each observation.
Type: double
Dimension: vector
predictions
Predicted value for each observation.
Type: double
Dimension: vector

Outputs

Score
MAE of the regression model.
Type: double
Dimension: scalar

Example

Usage of mae

targets = [3.14, 0.1, 50, -2.5];
predictions = [3.1, 0.5, 50.3, -5];
score = mae(targets, predictions);
> score
score = 0.81