Validation

Of course, the data scientist cannot generate a forecast and be done. An effort must be made to review the model’s performance or forecast accuracy. To help understand the accuracy of the model, predicted sales are compared to actual sales, setting the forecast to start at 2017-07-01 (to the end of the data). Again, a plot is used to visualize the output, showing the observed values compared to the rolling forecast predictions. Overall, the sales forecast seems to align with the actual sales values and shows an upward trend that starts from the beginning of the year.

We see the following code block:

pred = results.get_prediction(start=pd.to_datetime('2017-01-01'), dynamic=False)
pred_ci = pred.conf_int()
ax = y['2014':].plot(label='observed')
pred.predicted_mean.plot(ax=ax, label='One-step' ahead Forecast', alpha=.7, figsize=(14, 7))
ax.fill_between(pred_ci.index, pred_ci.iloc[:, 0], pred_ci.iloc[:, 1], color='k', alpha)
ax.set_xlabel('Date')
ax.set_ylabel('Furniture Sales')
plt.legend()
plt.show()

The actual results implemented in Watson Studio are as follows:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset