Nixtla / mlforecast

Scalable machine 🤖 learning for time series forecasting.
https://nixtlaverse.nixtla.io/mlforecast
Apache License 2.0
850 stars 80 forks source link

level in prediction for 50 #121

Closed ahmad-shahi closed 1 year ago

ahmad-shahi commented 1 year ago

When I use level 50, why it returns low and high for 50. 50 should be median and should return median. is it?

jmoralez commented 1 year ago

Thanks for raising this. Both interval methods compute the level from both sides, but we're not handling this case correctly. Will fix soon

jmoralez commented 1 year ago

Hey @ahmad-shahi. Are you using level=[50] with the conformal_distribution method? We would appreciate if you can provide a code snippet.

ahmad-shahi commented 1 year ago

Once model built, I use function predict model.predict(periods, level=[50]):

level_50

jmoralez commented 1 year ago

level in this context means the width of the prediction interval, so in this case the interval uses the q25 and q75 as lower and upper limits.

ahmad-shahi commented 1 year ago

Thanks for the clarification and good work. As advice, it is a bit confusing, level means confidence level, as users expect to return lower and upper bands as levels. You know better and it is just sharing my concern. Again, thanks for providing the good source for time series forecasting it is very user-friendly.

jmoralez commented 1 year ago

The reason is to be consistent with the forecast function from the forecast R package, where the lower and upper bounds of the interval are returned with similar namings (Lo 50 and Hi 50).

Thanks for raising the issue, feel free to open another one if you encounter a problem. I'm closing this one.

ahmad-shahi commented 1 year ago

The reason is to be consistent with the forecast function from the forecast R package, where the lower and upper bounds of the interval are returned with similar namings (Lo 50 and Hi 50).

Thanks for raising the issue, feel free to open another one if you encounter a problem. I'm closing this one.

Thanks for the good work and keep on.