Welcome to our Support Center

MeanAbsoluteError

Description

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

 

 

 

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.

 

Output parameters

 

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

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.
 Class : object, a custom loss class instance.

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).

Table of Contents