Stratified K-Fold
Stratified K-Fold is a cross-validation technique used in machine learning to ensure that each fold of the dataset maintains the same proportion of classes as the entire dataset. This is particularly useful for imbalanced datasets, where some classes may have significantly fewer samples than others. By preserving the class distribution, it helps in providing a more reliable estimate of the model's performance.
In Stratified K-Fold, the dataset is divided into K subsets or "folds." During each iteration, one fold is used for testing while the remaining K-1 folds are used for training. This process is repeated K times, allowing every sample to be used for both training and testing, which enhances the robustness of the model evaluation.