winedarksea / AutoTS

Automated Time Series Forecasting
MIT License
1.05k stars 96 forks source link

Supply Multiplevariate data to Predict() #237

Open rdpratti opened 3 months ago

rdpratti commented 3 months ago

Hi, I wanted to continue the conversation around autots ability to do multivariate analysis.

I have tried the stand-alone Sarimax algorithm with its exog parameter capabilities to add covariates to make better predictions, however, it did not improve the predictions.

I like autots's capabilities to find better performing algorithms/models from a set.

I submitted a series of tests, where I trained the model on Amazon stock data. I supplied model_list ='multivariate' , I saw that multivariate algorithms were applied (i.e. MultivariateRegression, RRVAR, etc). I then saved the model.csv file with the idea that I would like to use that with test data to predict.

I refit the model using the training data and the model.csv file. When trying to predict, I could not figure out how to supply my test_df to provide the additonal covariates that need to be used for prediction.

Thanks for your help.

rd

winedarksea commented 3 months ago

Exogenous/covariates often don't improve the performance very much. It's the whole signal and noise thing. Usually the signal that is any relationship between the two series is pretty small and buried in the large amounts of noise that most time series have. But sometimes there is a useful feature.

The series of commands I think you are looking for is something like this:

model = AutoTS(...)
model.import_best_model("saved_template.csv")
model.fit_data(df)
prediction = model.predict()

Let me know if that helps!