quantlab.model.evaluation.mae#

quantlab.model.evaluation.mae(pred, target)[source]#

Return the mean absolute error over the jointly finite cells, or NaN if none.

Parameters:
predarray_like

Predictions, any shape.

targetarray_like

Realised values, the same shape as pred.

Examples

>>> mae([1.0, 2.0, 3.0, 4.0], [1.0, 2.0, 3.0, 6.0])
0.5