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

StockPricePrediction_v2a_prophet.ipynb in [140] my predictions are not on val_size #5

Open
kimalaacer opened this issue Jan 30, 2020 · 2 comments

Comments

@kimalaacer
Copy link

kimalaacer commented Jan 30, 2020

Dear,
I am following you directions.
My data is 567 rows (train size = 400, Val_size=167, H=30)
When I reach step 140 in your notebook, ,i get multiple errors, due to the predictions falling in H (after Train_val_size) and do not have corresponding actual data.
another error I am getting is different dataframe size .

Compute error metrics

preds_list = forecast['yhat'][train_val_size:train_val_size+H]
print("For forecast horizon %d, predicting on day %d, date %s, the RMSE is %f" % (H, i, df['date'][i-1]+ timedelta(days = 1), get_rmse(df[i:i+H]['y'], preds_list)))
print("For forecast horizon %d, predicting on day %d, date %s, the mean MAPE is %f" % (H, i, df['date'][i-1]+ timedelta(days = 1), get_mape(df[i:i+H]['y'], preds_list)))
print("For forecast horizon %d, predicting on day %d, date %s, the mean MAE is %f" % (H, i, df['date'][i-1]+ timedelta(days = 1), get_mae(df[i:i+H]['y'], preds_list)))

your graph is showing that your predictions are falling within your actual data, and you are fine tuning the parameters accordingly.

Should the preds_list=forecast['yhat'][train size:train_val_size]?
Thank you for your time and consideration

@NGYB
Copy link
Owner

NGYB commented Feb 1, 2020

Not too sure what is the problem. Can you share what you tried to do and the error message you received.

@jmathews2
Copy link

Thanks for sharing your code. I think the question above can be summed up by asking how you would best recommend updating this code to generate predictions BEYOND the current data set size, ie, predictions in the future?

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

3 participants