scikit-learn interview question

Your scikit-learn model's cross-validation score varies a lot between folds. What does it mean, and what do you do?

Scenario Asked in Machine Learning Engineer interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

High variance across folds means the estimate is unreliable: the dataset may be small, folds may differ in class balance or groups, there may be outliers or time effects, or the model itself is unstable. Fix the CV design first (stratify, group, time-split, more folds or repeats), then look at the data and model.

Keep reading with a membership

The full answer with examples, key points and comparisons is part of the membership, along with every other interview answer, progress tracking and Daily Review. Most-asked answers stay free to read.

See plans and free trial Already a member? Sign in

More scikit-learn questions

← All scikit-learn questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake