0

I'm following this tutorial: https://neptune.ai/blog/arima-sarima-real-world-time-series-forecasting-guide#:~:text=sarima%20%3D%20SARIMAX%20%28lim_catfish_sales%20%5B%20%27Total%27%20%5D%2C%20order%3D,1%2C%200%2C%2012%29%29%20predictions%20%3D%20sarima.fit%20%28%29.predict%20%28%29

I can obviously reproduce the code, but I don't understand how I can predict datapoints in the future. Can anybody explain me?

Thanks FP

I followed the tutorial, but the prediction overlaps existing data instead of forecasting data in the future

  • You can't with 100% certainty predict the future, if that is what you're wondering about. It's an estimate / forecast to get an idea... – juanpethes Aug 03 '23 at 16:36
  • Please provide enough code so others can better understand or reproduce the problem. – Community Aug 03 '23 at 17:19

1 Answers1

1

Well you are using statsmodel package functions.

You need to use the predict method (see documentation below). Based on your required args it can be as simple as model_fit.predict(start=start_index, end=end_index)

https://www.statsmodels.org/stable/generated/statsmodels.tsa.arima.model.ARIMA.html

Suraj Shourie
  • 536
  • 2
  • 11
  • ah! that's it, thanks! BTW, can I compute confidence intervals on predicted results? – effepelosa Aug 04 '23 at 07:10
  • I'm not sure... but go through the documentation, there is a plot_predict() function which kind-of does that. You can also look at the [examples](https://www.statsmodels.org/stable/examples/index.html#time-series-analysis) – Suraj Shourie Aug 04 '23 at 13:14