Artificial Intelligence
Machine Learning
Subjective
Oct 13, 2025
What is cross-validation and when should you use different types?
Detailed Explanation
Cross-validation estimates model performance by training and testing on different data subsets to reduce overfitting to specific train-test splits.\n\n• K-fold: Standard approach, good for most problems\n• Stratified: Maintains class distribution, essential for imbalanced data\n• Time-series: Respects temporal order, prevents data leakage\n• Leave-one-out: Maximum data usage, computationally expensive\n\nExample: Use stratified 5-fold CV for classification, time-series split for financial data, nested CV for hyperparameter tuning. Always ensure no data leakage between folds.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts