In nested cross-validation, how do you pick final hyperparameters when outer folds select different settings?
Quick Overview
Asks how to pick the hyperparameters for the final model when the outer folds of nested cross-validation each choose different settings. Tests whether you know what nested CV estimates, how to build the deployed model and how to read disagreement between folds.
In nested cross-validation, how do you pick final hyperparameters when outer folds select different settings?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
In nested cross-validation, how do you pick final hyperparameters when outer folds select different settings?
In nested CV, an inner loop tunes hyperparameters on each outer training set, and the outer loop scores the tuned model on the held-out outer fold. Suppose five outer folds pick three different values of the regularization strength.
```hint What is being estimated
Ask whether the outer scores describe one particular model or a whole procedure that includes the tuning step.
```
```hint Which model gets the number
List the steps the outer loop ran on each training set. Then ask which deployed models those scores are a fair estimate for.
```
### What a Strong Answer Covers
- What quantity nested CV estimates
- Where the final hyperparameters should come from, and whether the outer estimate applies to the deployed model
- Why outer folds disagree and what the disagreement tells you
- How common shortcuts for combining outer-fold choices hold up, and what to do when the selections are unstable
### Follow-up Questions
- How would you make the tuning step prefer simpler settings when many are near-equivalent, and still have nested CV evaluate it?
- Retuning on the full data costs a day of compute. What are your options, and what does each give up?
- The outer scores range from 0.70 to 0.88. How do you report that, and what would you look into?
- When is a single train, validation and test split enough, so nested CV is not needed?
Overview: Asks how to pick the hyperparameters for the final model when the outer folds of nested cross-validation each choose different settings. Tests whether you know what nested CV estimates, how to build the deployed model and how to read disagreement between folds.
In nested cross-validation, how do you pick final hyperparameters when outer folds select different settings?
In nested CV, an inner loop tunes hyperparameters on each outer training set, and the outer loop scores the tuned model on the held-out outer fold. Suppose five outer folds pick three different values of the regularization strength.
What a Strong Answer Covers Guidance
What quantity nested CV estimates
Where the final hyperparameters should come from, and whether the outer estimate applies to the deployed model
Why outer folds disagree and what the disagreement tells you
How common shortcuts for combining outer-fold choices hold up, and what to do when the selections are unstable
Follow-up Questions Guidance
How would you make the tuning step prefer simpler settings when many are near-equivalent, and still have nested CV evaluate it?
Retuning on the full data costs a day of compute. What are your options, and what does each give up?
The outer scores range from 0.70 to 0.88. How do you report that, and what would you look into?
When is a single train, validation and test split enough, so nested CV is not needed?