Why is k-fold cross-validation preferred over a single train-test split?medium
Answer
A single split gives a high-variance estimate — you might get lucky or unlucky.
Explanation
A single split gives a high-variance estimate — you might get lucky or unlucky. k-fold uses all data for both training and validation across k rounds, giving a more stable estimate. Stratified k-fold preserves class distribution. For time-series (demand forecasting), use TimeSeriesSplit to avoid data leakage.
Follow-upCan you give a production example?