AutoViML / Auto_TS

Automatically build ARIMA, SARIMAX, VAR, FB Prophet and XGBoost Models on Time Series data sets with a Single Line of Code. Created by Ram Seshadri. Collaborators welcome.
Apache License 2.0
723 stars 113 forks source link

About saving the model and load it to predict #72

Closed kennis222 closed 2 years ago

kennis222 commented 2 years ago

Hi contributor,

I have followed the example instruction to save the model. After loading it to predict, it seems that the loading model does not display "predicted" results. The results of the second screenshot are the desired results, but the loading model does not perform the same. I am not sure which part I need to fix. Thank you.

Screen Shot 2022-01-20 at 3 01 12 PM Screen Shot 2022-01-20 at 3 01 20 PM

AutoViML commented 2 years ago

Hi @kennis222 👍 Your observation is correct. There may be one of two reasons for that oddity:

  1. You might want to check if best_model indeed is a VAR model object. It may not be. But make sure.

  2. The predict() function does a few steps to preprocess the data before feeding to a VAR model. That might be the reason for the change.

Please check and let me know AutoViML

kennis222 commented 2 years ago

Hi contributor,

  1. You are right. It seems that the best_model is not a VAR model, instead, the VARMAXResultsWrapper. Screen Shot 2022-01-21 at 11 28 33 AM Screen Shot 2022-01-21 at 11 28 37 AM
  2. I just double check the function of VARMAXResults.predict, and it works by entering the specific date. Screen Shot 2022-01-21 at 11 41 27 AM Thank you 👍