What is Cross-Validation?
TL;DR
A technique that splits data into multiple groups to fairly evaluate model generalization. Effective for detecting overfitting.
Cross-Validation: Definition & Explanation
Cross-validation is a technique for accurately evaluating a machine learning model's generalization performance (prediction accuracy on unseen data). In the most common K-fold cross-validation, data is divided into K groups (folds), with one used for testing and the rest for training, repeated K times to compute an average score. This allows reliable evaluation using all data for both training and evaluation, even with limited datasets. It is used for detecting overfitting, comparing models, and selecting hyperparameters. Variations include Stratified K-fold (maintaining class distribution) and Group K-fold (respecting group structure), chosen based on data characteristics.