Performing k-fold cross-validation
We’ll be using a new dataset in this chapter – the sales of an online retailer in the United Kingdom. This data has been anonymized, but it represents 3 years of daily sales amounts, as displayed in the following graph:
Figure 12.1 – Daily sales of an anonymous online retailer
This retailer has not seen dramatic growth over the 3 years of data, but it has seen a massive boost in sales at the end of each year. The main customers of this retailer are wholesalers, who typically make their purchases during the work week. This is why when we plot the components of Prophet’s forecast, you’ll see that Saturday and Sunday’s sales are the lowest. We’ll use this data to perform cross-validation in Prophet.
Before we get to modeling, though, let’s first review traditional validation techniques used to tune a model’s hyperparameters and report performance. The...