Skip to content

Why predictions do not produce the last timestamp result? #1683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kkckk1110 opened this issue Feb 28, 2025 · 0 comments
Open

Why predictions do not produce the last timestamp result? #1683

kkckk1110 opened this issue Feb 28, 2025 · 0 comments

Comments

@kkckk1110
Copy link

Hello, I am using neuralprophet for forecasting. I came across a problem. When I set n_lags > 1, the predict() function does not produce forecasting result for the last timestamp. For example, the date ranges from 2019-07-31 to 2019-12-31. However, m.predict(df) only produced forecasting from 2019-07-31 to 2019-11-30, and result for 12-31 is missing. How does this happen?

set_random_seed(42)

m = NeuralProphet(trend_global_local="global", n_lags = 2, n_forecasts = 1,
season_global_local="local", epochs=5, future_regressors_d_hidden = 4,
future_regressors_num_hidden_layers = 32)
df_train, df_test = m.split_df(df=df, freq="ME", valid_p=0.1)

m.set_plotting_backend("plotly-static")

for item in future_regressor_lst:
m.add_future_regressor(item)

metrics_train = m.fit(df=df_train, freq="ME")
metrics_test = m.test(df=df_test)

forecast = m.predict(df)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant