Welcome to our Support Center

MeanAbsoluteError

Description

Computes the mean absolute error between the labels and predictions. Type : polymorphic.

 

 

Input parameters

 

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

 

Output parameters

 

mean_abs_error : float, result.

Use cases

Mean Absolute Error (MAE) is a metric commonly used in machine learning, specifically in regression problems. It measures the average absolute differences between predictions and ground truths, i.e. how much the model’s predictions differ on average from the truth.

Here are some specific areas where MAE is commonly used :

    • Sales prediction : in sales prediction problems, MAE can be used to measure how much a model’s sales predictions differ from actual sales.
    • Weather forecasting : MAE can be used to evaluate the performance of models that forecast continuous quantities such as temperature or precipitation.
    • Energy estimation : in energy estimation problems, such as predicting the energy output of a wind turbine or solar panel, MAE can be used to evaluate model performance.
    • Finance : in problems involving the prediction of stock prices or other financial values, MAE can be used to assess how much the model’s predictions differ from the actual price.

One advantage of the MAE is that it is easy to interpret, as it gives a direct average measure of error in terms of the unit of the variable being predicted. Another advantage is that it penalizes large errors less than other metrics such as Mean Squared Error (MSE), which may be preferable if you want to avoid giving too much importance to outliers.

Calculation

Mean Absolute Error (MAE) is a regression metric that measures the mean of the absolute differences between predicted and actual values. For each pair of values (predicted and actual), we calculate their absolute difference. We do this for all the samples in our dataset and then calculate the average of these absolute errors. In this way, the MAE represents the average error of our predictions. A smaller MAE means that our predictions are closer to the true values, indicating a better prediction model.

 

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

Easy to use

Table of Contents