Why should two candidate models be compared on exactly the same cross-validation fold splits?

Quick Overview

Asks why two candidate models should be scored on the same cross-validation fold splits when you compare them. Tests your understanding of fold-level variance, paired comparisons, the statistical tests used on per-fold scores, and how to set up the splits in practice.

Why should two candidate models be compared on exactly the same cross-validation fold splits?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

You are choosing between two candidate models using k-fold cross-validation. Why should both models be evaluated on exactly the same fold splits? ```hint Where the noise comes from Fold scores vary even for a single model. Ask how much of that spread comes from the folds themselves, and what happens to it when you subtract one model's fold score from the other's. ``` ```hint Testing the gap Think about which statistical tests you would run on the per-fold results and what they assume about how the scores were produced. ``` ### What a Strong Answer Covers - How fold-to-fold variation in difficulty can be larger than the real gap between two models. - The paired design: per-fold differences cancel the shared fold effect, and why the variance of a difference shrinks when scores are correlated. - Which tests need matched folds, and the caveat that overlapping training sets make a naive paired test too optimistic. - How to guarantee identical splits in practice. ### Follow-up Questions - Why is a plain paired t-test on k-fold scores still too optimistic, and what does the Nadeau-Bengio correction change? - How would you compare two models fairly when each one also has hyperparameters tuned inside the folds? - What changes when the data are time-ordered or grouped by user? - With only 5 folds, can a Wilcoxon signed-rank test ever reach significance at the 0.05 level?

Overview: Asks why two candidate models should be scored on the same cross-validation fold splits when you compare them. Tests your understanding of fold-level variance, paired comparisons, the statistical tests used on per-fold scores, and how to set up the splits in practice.

Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

You are choosing between two candidate models using k-fold cross-validation. Why should both models be evaluated on exactly the same fold splits?

What a Strong Answer Covers Guidance

  • How fold-to-fold variation in difficulty can be larger than the real gap between two models.
  • The paired design: per-fold differences cancel the shared fold effect, and why the variance of a difference shrinks when scores are correlated.
  • Which tests need matched folds, and the caveat that overlapping training sets make a naive paired test too optimistic.
  • How to guarantee identical splits in practice.

Follow-up Questions Guidance

  • Why is a plain paired t-test on k-fold scores still too optimistic, and what does the Nadeau-Bengio correction change?
  • How would you compare two models fairly when each one also has hyperparameters tuned inside the folds?
  • What changes when the data are time-ordered or grouped by user?
  • With only 5 folds, can a Wilcoxon signed-rank test ever reach significance at the 0.05 level?