7 questionsCross validation is a technique for testing a machine learning model by splitting the data into several parts and training and testing the model multiple times on different combinations of those parts.
Real-world example
A team building a disease prediction model uses five fold cross validation to make sure their reported accuracy is stable and not just the result of one favorable data split.
Likely follow-ups
- What is a validation set, What is overfitting, What is model evaluation
Machine Learning Fundamentals Deep Learning Supervised & Unsupervised Learning
It gives a more reliable estimate of model performance than a single train test split, because it reduces the chance that results depend on one lucky or unlucky split of the data.
Real-world example
A team building a disease prediction model uses five fold cross validation to make sure their reported accuracy is stable and not just the result of one favorable data split.
Likely follow-ups
- What is a validation set, What is overfitting, What is model evaluation
Machine Learning Fundamentals Deep Learning Supervised & Unsupervised Learning
In k fold cross validation, the data is divided into k equal parts. The model is trained on k minus one parts and tested on the remaining part, and this process repeats k times so every part is used for testing once.
Real-world example
A team building a disease prediction model uses five fold cross validation to make sure their reported accuracy is stable and not just the result of one favorable data split.
Likely follow-ups
- What is a validation set, What is overfitting, What is model evaluation
Machine Learning Fundamentals Deep Learning Supervised & Unsupervised Learning
Common techniques include k fold cross validation, stratified k fold for classification with imbalanced classes, and leave one out cross validation for very small datasets.
Real-world example
A team building a disease prediction model uses five fold cross validation to make sure their reported accuracy is stable and not just the result of one favorable data split.
Likely follow-ups
- What is a validation set, What is overfitting, What is model evaluation
Machine Learning Fundamentals Deep Learning Supervised & Unsupervised Learning
A common mistake is applying cross validation after already tuning the model on the full dataset, which can still leak information and give overly confident results.
Real-world example
A team building a disease prediction model uses five fold cross validation to make sure their reported accuracy is stable and not just the result of one favorable data split.
Likely follow-ups
- What is a validation set, What is overfitting, What is model evaluation
Machine Learning Fundamentals Deep Learning Supervised & Unsupervised Learning
A team building a disease prediction model uses five fold cross validation to make sure their reported accuracy is stable and not just the result of one favorable data split.
Real-world example
A team building a disease prediction model uses five fold cross validation to make sure their reported accuracy is stable and not just the result of one favorable data split.
Likely follow-ups
- What is a validation set, What is overfitting, What is model evaluation
Machine Learning Fundamentals Deep Learning Supervised & Unsupervised Learning
Use stratified cross validation for classification tasks with uneven class sizes, and always perform any data preprocessing separately within each fold.
Real-world example
A team building a disease prediction model uses five fold cross validation to make sure their reported accuracy is stable and not just the result of one favorable data split.
Likely follow-ups
- What is a validation set, What is overfitting, What is model evaluation
Machine Learning Fundamentals Deep Learning Supervised & Unsupervised Learning