12
Performing Cross-Validation
The concept of keeping training data and testing data separate is sacrosanct in machine learning and statistics. You should never train a model and test its performance on the same data. Setting data aside for testing purposes has a downside, though: that data has valuable information that you would want to include in training. Cross-validation is a technique that’s used to circumvent this problem.
You may be familiar with k-fold cross-validation, but if you are not, we will briefly cover it in this chapter. K-fold cross-validation, however, will not work on time series data. It requires that the data be independent, an assumption that time series data does not hold. An understanding of k-fold cross-validation ...
Get Forecasting Time Series Data with Prophet - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.