When should cross-validation not be performed?

Quick Overview

Explain when standard k-fold cross-validation should not be used and what to use instead. Tests understanding of the independence assumption, time series and grouped splits, when a single hold-out is precise enough, and leakage from the test set or preprocessing.

When should cross-validation not be performed?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

When should cross-validation not be performed? Consider both cases where standard random k-fold CV gives a misleading estimate and cases where it is not worth running. ```hint Check the assumption Random k-fold treats every row as an independent draw from the same distribution the model will face later. Think of common datasets where that is false, and of cases where k training runs add little information. ``` ### What a Strong Answer Covers - The assumption random k-fold CV relies on and what goes wrong when it fails - Temporal data and the kind of split that replaces random folds - Grouped or spatially dependent data and how to split it - When a single hold-out is enough or k training runs cost too much - Leakage from the test set or from preprocessing fit outside the folds ### Follow-up Questions - How would you choose the gap between training and validation windows for a model that predicts 7 days ahead? - You need to tune hyperparameters and also report an unbiased performance estimate. How do you combine CV with that? - Your CV score is high but production performance is much lower. Which CV assumptions would you check first? - With only 200 labeled rows, would you use a single hold-out? Why or why not?

Overview: Explain when standard k-fold cross-validation should not be used and what to use instead. Tests understanding of the independence assumption, time series and grouped splits, when a single hold-out is precise enough, and leakage from the test set or preprocessing.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

When should cross-validation not be performed? Consider both cases where standard random k-fold CV gives a misleading estimate and cases where it is not worth running.

What a Strong Answer Covers Guidance

  • The assumption random k-fold CV relies on and what goes wrong when it fails
  • Temporal data and the kind of split that replaces random folds
  • Grouped or spatially dependent data and how to split it
  • When a single hold-out is enough or k training runs cost too much
  • Leakage from the test set or from preprocessing fit outside the folds

Follow-up Questions Guidance

  • How would you choose the gap between training and validation windows for a model that predicts 7 days ahead?
  • You need to tune hyperparameters and also report an unbiased performance estimate. How do you combine CV with that?
  • Your CV score is high but production performance is much lower. Which CV assumptions would you check first?
  • With only 200 labeled rows, would you use a single hold-out? Why or why not?