Welcome to our Support Center

MeanAbsolutePercentageError

Description

Computes the mean absolute percentage error between y_true and y_pred.​ Type : polymorphic.

 

 

 

Input parameters

 

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

 

Output parameters

 

MeanAbsolutePercentageError out : class

Required data

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

Use cases

Mean Absolute Percentage Error (MAPE) is a loss function used in regression problems to measure a model’s performance in terms of proportional accuracy. It calculates the average of the absolute errors divided by the actual values, expressed as a percentage.

MAPE is particularly useful in contexts where relative errors are more significant than absolute errors, such as in financial planning or sales forecasting, where percentage deviations from actual values are critical for decision-making.

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

Table of Contents