Replies: 2 comments 6 replies
-
Hi, i am stuck with the same problem. Have you found a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey. Can you provide a reproducible example? The following works: import os
import pandas as pd
from neuralforecast import NeuralForecast
from neuralforecast.models import LSTM
from neuralforecast.utils import AirPassengersDF
os.environ['NIXTLA_ID_AS_COL'] = '1'
nf = NeuralForecast(
freq='M',
models=[LSTM(h=12, input_size=24, max_steps=1)]
)
nf.fit(AirPassengersDF)
# predict first time
preds = nf.predict()
# incorporate predictions into train df (these can be your real values instead)
new_df = pd.concat([AirPassengersDF, preds.rename(columns={'LSTM': 'y'})])
# predict again using this extended dataframe
new_preds = nf.predict(df=new_df)
print(pd.concat([preds, new_preds[['ds', 'LSTM']]], axis=1)) # these are all different |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If one needs to use a trained NHITS model (using Autonhits) for a horizon of 1 week ahead ( 168 hours ahead) for the upcoming month by just changing the training data as new data is available, how can we do it?
Assume model1 is the trained and tuned model on training data Y_train, I tried doing the following to obtain results for upcoming 4 weeks.
week 1: model1.predict(Y_train)
week 2: model1.predict(Y_train+data from week1)
... and so on
But the obtained predictions for all these week are the same in spite of changing the data in predict function.
Is there any other way of achieving this?
Many thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions