January 2020
Beginner to intermediate
432 pages
11h 24m
English
We are also interested in some basic performance evaluation of the fitted model. Execute the following steps to visually inspect the predicted versus actual gold prices in 2005.
selected_columns = ['ds', 'yhat_lower', 'yhat_upper', 'yhat']df_pred = df_pred.loc[:, selected_columns].reset_index(drop=True)df_test = df_test.merge(df_pred, on=['ds'], how='left')df_test.ds = pd.to_datetime(df_test.ds)df_test.set_index('ds', inplace=True)
We merged the test set with the prediction DataFrame. We used a left join, which returns all the rows from the left table (test set) and the matched rows from the right table (prediction DataFrame) while leaving the unmatched rows empty. This way, we also ...
Read now
Unlock full access