Comments (10)
@elephaint but I would like to do the following:
- Fit the model on training data
- Predict
h
steps after a given input sequence other than the training period (which I was assuming was the role ofX_df
)How can I supply an unseen input sequence to the model and get it to predict the next sequence?
In an ARIMA model, we train on [x_t, x_{t+1}, ...., x_{t + T}] for a particular time series. We can then make predictions for that series only, for an arbitrary long period following x_{t + T} (by setting the horizon in our predict function). We can optionally add exogenous variables during training, and during the prediction period (the latter by including them in X_df
for all dates in your forecasting horizon).
You can't 'supply an unseen input sequence' to an ARIMA model. If you have an unseen input sequence, you would normally train an ARIMA model on that unseen input sequence, and subsequently create forecasts for a horizon using that newly trained model. Each new time series requires a new ARIMA model.
from statsforecast.
Actually the quick fix expected_shape = (h * len(self.ga), self.ga.data.shape[1] + 2)
gets rid of the error but the predictions won't update if passing a different slice of the dataframe in X_df
from statsforecast.
Hey. The X_df argument is for future values of exogenous features and you don't have any, so you don't need to provide it.
from statsforecast.
@jmoralez so what is the correct way to predict future values for some input other than the training dataframe?
from statsforecast.
@Vitorbnc You can just run predict(h=12, level=[90])
. That will give you the predictions for the timeperiod following the training period.
from statsforecast.
@elephaint but I would like to do the following:
- Fit the model on training data
- Predict
h
steps after a given input sequence other than the training period (which I was assuming was the role ofX_df
)
How can I supply an unseen input sequence to the model and get it to predict the next sequence?
from statsforecast.
@elephaint ok then, that makes sense. Thanks for the explanation. I am trying to do the same with mlforecast
, but I am getting a different error:
I am sure there is no NaN
neither in the train nor the test dataframes though
from statsforecast.
Thanks - it's very hard to debug based on this picture only. Can you share a minimal working example of your code?
Based on the picture I can only suggest to double check the existence of NaN in train_df.
Note that you are training and testing on the same timestamps - I assume that is on purpose (as it's something that you'd want to avoid normally in forecasting)? I.e. you're supplying the full train_df as training set, and use a subset of train_df as test set. Hence, any test results you get will not be representative for the actual forecasting performance. I.e. normally one would do something like this:
train_df = df[:-12]
test_df = df[-12:]
in order to properly separate train- and test sets.
from statsforecast.
Related Issues (20)
- remove numba dependency HOT 2
- Adding support for NPTS and Seasonal NPTS HOT 3
- Adding bootstrapping functionnality from residuals of a model
- [Models] provide summary
- StatsForecast/AutoArima ZeroDivisionError HOT 2
- Prediction Interval Questions HOT 6
- Croston: Error fitting with 0.0 values HOT 1
- Make best fitted ARIMA an output of AutoARIMA HOT 2
- IMAPA Model not working in statsforecast=="1.7.2" HOT 1
- Allow external regressors TBATS HOT 2
- FutureWarning in AirPassengersDF
- can we reduce the prediction accuracy HOT 18
- [AutoETS] Access the model components (Error, Trend and Seasonality) HOT 1
- MSTL Plot HOT 2
- [AutoTBATS,TBATS] Usage example HOT 3
- AutoARIMA import error HOT 2
- Nixtla statsforecast/statsmodels failing to import polars HOT 3
- Independency of Time Series with Different Unique IDs HOT 2
- [Question] AutoARIMA.forward HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from statsforecast.