MeanAbsoluteError

Description

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

 

Documentation illustration (illustration unavailable in the archive).

 

 

Input parameters

 

Parameters : cluster,

reduction : enum, type of reduction to apply to the loss. In almost all cases this should be “Sum over Batch“.
sample weights : boolean, if enabled, adds an input for weighting each sample individually.

 

Documentation illustration (illustration unavailable in the archive).

Output parameters

 

Loss : cluster, this cluster defines the loss function used for model training.

Documentation illustration (illustration unavailable in the archive). enum : enum, an enumeration indicating the loss type (e.g., MSE, CrossEntropy, etc.). If enum is set to CustomLoss, the custom class on the right will be used as the loss function. Otherwise, the selected loss will be applied with its default configuration.
Documentation illustration (illustration unavailable in the archive). Class : object, a custom loss class instance.

Documentation illustration (illustration unavailable in the archive).

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.

Example

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 Deep Learning library to run it).

Documentation illustration (illustration unavailable in the archive).