Cross-validation prediction produces an out-of-fold prediction for every training case: each prediction comes from a model that did not train on that case’s validation fold. This provides unbiased case-level predictions for comparing with observed targets, rather than only an averaged cross-validation score. section 7.2.3
Use the predictions to:
- Inspect performance across different subsets of the data. section 7.2.3
- Identify possible overfitting or underfitting by comparing predictions with expected target values. section 7.2.3
Rental-price baseline
A linear-regression baseline uses sklearn.model_selection.cross_val_predict to estimate rental prices for all cases. The resulting predictions include implausible negative values, with R-squared 0.320, RMSE 17,197, and MAE 12,568 Yen, making the baseline’s weaknesses visible.
