Home / ML Associate practice test / Model Development / Question

Databricks Machine Learning Associate · free practice question

A classifier is being trained on an imbalanced medical dataset. The team wants each validation fold to preserve roughly the same class proportions as the full…

Exam-style question on Model Development from the free ML Associate practice test, with the answer and a full explanation below.

Updated November 10, 2026

Model Development

A classifier is being trained on an imbalanced medical dataset. The team wants each validation fold to preserve roughly the same class proportions as the full dataset so performance estimates remain stable during tuning. Which approach best supports that goal?

  1. AUse ordinary KFold without labels so each split is random and independent of the class frequencies in the data
  2. BUse LeaveOneOut so each fold holds out a single example regardless of how rare the positive class is overall
  3. CUse a single train-validation split and accept whatever class ratios happen to appear in that one split
  4. DUse StratifiedKFold so each fold approximately maintains the original label distribution during validation
  5. EUse PCA before splitting so class imbalance is reduced in the lower-dimensional feature space for each fold
Answer & explanation

Correct answer: D

WHY D: StratifiedKFold is designed to preserve class proportions across folds for classification tasks, which is especially useful with imbalance.

WHY NOT A: Ordinary KFold ignores labels and can produce unstable class ratios from fold to fold.

WHY NOT B: LeaveOneOut is expensive and does not preserve class balance per fold; each validation fold is one example.

WHY NOT C: One split provides less stable estimates and leaves the class ratio to chance.

WHY NOT E: PCA transforms features; it does not rebalance labels.

Take the full ML Associate practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Machine Learning Associate practice test. Take it and get a section-by-section score.

Start the free test →