Skip to content

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

@kimalaacer

Description

@kimalaacer

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

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