Skip to content
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

Adding auto regression n_lags- seems to remove any predictions or cause a length mismatch in datasets? very basic- #1577

Closed
suntochukwu opened this issue Jun 6, 2024 · 0 comments · Fixed by #1585
Assignees

Comments

@suntochukwu
Copy link

suntochukwu commented Jun 6, 2024

I feel like this is extremely basic. The data set is just gold stock market prices- ds/datetime and closing price/y.

mgc_data = yf.download('MGC=F', period='1y', interval='1h')
mgc_data= pd.DataFrame(mgc_data).reset_index()
mgc_data.rename(columns={'Datetime': 'ds' ,'Close': 'y' }, inplace=True)


#--prophet
basicdf= mgc_data[['ds','y']]
basicdf.dropna(inplace=True)`

Here is the code:

m2 = NeuralProphet(drop_missing= True , growth= 'discontinuous', n_lags=50)
m2.set_plotting_backend("plotly-static")
metrics = m2.fit(basicdf, freq= 'H')
#future = m2.make_future_dataframe(basicdf, periods=50, n_historic_predictions=True)
forecast = m2.predict(future) 

Without n_lags the models works and predicts well. When i add autoregression i get an error:

dataset returned:
ds step0 trend0 season_weekly0 season_daily0 ar0 step1 trend1 season_weekly1 season_daily1 ... step98 trend98 season_weekly98 season_daily98 ar98 step99 trend99 season_weekly99 season_daily99 ar99
0 2023-06-08 20:00:00 NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
1 2023-06-08 21:00:00 NaN NaN NaN NaN NaN NaN NaN NaN

@MaiBe-ctrl MaiBe-ctrl self-assigned this Jun 17, 2024
@ourownstory ourownstory linked a pull request Jun 19, 2024 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

2 participants