Skip to content

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

@kkckk1110

Description

@kkckk1110

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions