Cross-Validation
Cross-validation splits data into K folds, training on K-1 folds and validating on the remaining one in rotation, to evaluate generalization with reduced variance.
Purpose
To evaluate model generalization robustly and select hyperparameters.
Mechanism
K-fold: split data into K parts, train on K-1 and validate on 1 in rotation, then average the K errors. Stratified K-fold preserves class ratios. Leave-one-out (LOO) is the K=N special case. Nested CV combines hyperparameter selection with performance estimation.
Use cases
- Model evaluation
- Hyperparameter tuning
- Generalization estimation