Welcome to our Support Center



Computes the mean of absolute difference between labels and predictions.​ Type : polymorphic.




Input parameters


MeanAbsoluteError in : class
reduction : enum, type of reduction to apply to the loss. In almost all cases this should be “Sum over Batch“.


Output parameters


MeanAbsoluteError out : class

Required data

Β y_pred :Β array,Β predicted values.
Β y_true :Β array,Β true values.

Use cases

Mean Absolute Error (MAE) is a loss function primarily used in regression problems. It calculates the average of the absolute differences between predictions and the actual values.

This function is particularly useful when you want to prevent large errors from disproportionately impacting the loss function, which can occur with mean squared error (MSE). Therefore, MAE is often used in situations where data may contain outliers or non-uniform variations.


All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install HAIBAL library to run it).

Table of Contents