Interpretation of darts MAPE

84 views Asked by At

I have fitted a lgb_model and am experimenting with the backtest() method from darts. Just to confirm, the output is 5.7%, the MAPE correct?

from darts.models.forecasting.lgbm import LightGBMModel
lgb_model = LightGBMModel(lags=30)
lgb_model.fit(val)

# Backtest the model
backtest_results = lgb_model.backtest(series=val)

# Print the backtest results
print(backtest_results)

output:

...
[LightGBM] [Warning] No further splits with positive gain, best gain: -inf
[LightGBM] [Warning] No further splits with positive gain, best gain: -inf
[LightGBM] [Warning] No further splits with positive gain, best gain: -inf
5.701803383509749
1

There are 1 answers

0
Bogdan Tesileanu On BEST ANSWER

Yes, the output is interpreted as a percent, 5.7% in this case.

Looking at the darts documentation for the backtest() function, the default metric is MAPE. And looking at the actual darts code for the mape() function:

100.0 * np.mean(np.abs((y_true - y_hat) / y_true))

The 100 in the beginning means the value has already been converted to a percent for you, thus a 5.7% MAPE is the correct interpretation.