pythonpredictionforecastsarimax

how to predict future datapoints with ARIMA/SARIMA in python?


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


Solution

  • 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