What bias, variance, and compute trade-offs govern the choice of k in k-fold cross-validation?

Quick Overview

Asks how the number of folds k in k-fold cross-validation affects the bias and variance of the performance estimate and the compute cost. Tests whether you can reason about training set size, correlation between fold models, and sensible choices of k for large and small datasets.

What bias, variance, and compute trade-offs govern the choice of k in k-fold cross-validation?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What bias, variance, and compute trade-offs govern the choice of k in k-fold cross-validation? ```hint Training set size For a given k, what fraction of the data does each fold's model train on, and how does that compare with the final model trained on all of it? ``` ```hint Overlap between folds As k grows, how much do the training sets of different folds overlap, and what does that do to the benefit of averaging the k error estimates? ``` ### What a Strong Answer Covers - Why the cross-validation estimate is pessimistically biased and how that bias changes with k - Where the variance of the estimate comes from, including correlated models at large k, and why the relationship with k is not strictly monotonic - How compute scales with k, with tuning grids and repeats, and when leave-one-out has a cheap closed form - Practical choices of k for large and for small datasets ### Follow-up Questions - When does leave-one-out cross-validation give an especially noisy estimate, and why? - What does repeated k-fold cross-validation buy you, and what does it cost? - Why is a standard error computed from the k fold scores, treated as independent samples, too optimistic? - How would you choose k inside nested cross-validation, where the inner loop tunes hyperparameters and the outer loop estimates performance?

Overview: Asks how the number of folds k in k-fold cross-validation affects the bias and variance of the performance estimate and the compute cost. Tests whether you can reason about training set size, correlation between fold models, and sensible choices of k for large and small datasets.

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

What bias, variance, and compute trade-offs govern the choice of k in k-fold cross-validation?

What a Strong Answer Covers Guidance

  • Why the cross-validation estimate is pessimistically biased and how that bias changes with k
  • Where the variance of the estimate comes from, including correlated models at large k, and why the relationship with k is not strictly monotonic
  • How compute scales with k, with tuning grids and repeats, and when leave-one-out has a cheap closed form
  • Practical choices of k for large and for small datasets

Follow-up Questions Guidance

  • When does leave-one-out cross-validation give an especially noisy estimate, and why?
  • What does repeated k-fold cross-validation buy you, and what does it cost?
  • Why is a standard error computed from the k fold scores, treated as independent samples, too optimistic?
  • How would you choose k inside nested cross-validation, where the inner loop tunes hyperparameters and the outer loop estimates performance?