The MAPE calculation is as follows:
When you use a separate dataset for hold-out, and in this dataset, under the target feature there is at least one cell that is 0 or is empty, MAPE calculation will produce an infinite number ( division by zero ), and therefore on Decanter AI it will be shown as NaN (Not a number).
If MAPE is not a requirement for this experiment, we would recommend using another metric to measure the model performance. However, if MAPE is required, consider the following workarounds:
Modify the target variable cells
Change all 0 or no value cells to a number that’s close to 0. After the changes, you can use this dataset as
the hold-out dataset and explain the reasoning in the report.
Calculate MAPE
Don’t use the dataset with 0 in the data and calculate the MAPE score on your own.