Home / ML Associate practice test / Model Development

Free · 8 questions with explanations

Model Development: Databricks Machine Learning Associate Practice Questions

Exam-style questions on Model Development. Pick your answer, then open the explanation to see why it's right — and why the other options are wrong.

1 Model Development

A retailer wants to forecast next week's unit sales for each store. The target is a real-valued number and model quality will be judged by prediction error in the original units sold. Which modeling family best matches this problem?

  1. AA classifier, because the target can be binned into categories after training without changing the task definition
  2. BA regressor, because the target is continuous and the model should output numeric sales estimates for each store
  3. CA clustering algorithm, because grouping similar stores replaces the need to predict a numeric target value
  4. DAn association-rule model, because product co-occurrence patterns are equivalent to weekly sales forecasting targets
  5. EA topic model, because it can discover latent themes in text and reuse them as numeric forecasts for sales
Show answer & explanation

Correct answer: B

WHY B: Forecasting a continuous numeric target is a regression task, so a regressor is the appropriate algorithm family. WHY NOT A: Classification predicts discrete labels rather than numeric quantities. WHY NOT C: Clustering does not learn a supervised continuous target. WHY NOT D: Association rules are not regression models. WHY NOT E: Topic models are for text structure, not store-level numeric forecasting.

2 Model Development

A linear baseline underfits both the training and validation sets on a complex nonlinear problem. Which change is most likely to reduce bias and improve fit, assuming enough data is available?

  1. AReduce model complexity further by removing interaction terms and increasing regularization to simplify the hypothesis class
  2. BUse fewer training examples so the model can memorize the smaller sample and therefore generalize more accurately
  3. CIncrease model flexibility, such as adding nonlinear features or using a more expressive algorithm family
  4. DReplace cross-validation with one random split so the reported score rises even if the model remains too simple
  5. EKeep the same simple model and tune only the random seed, because underfitting is usually caused by unlucky shuffling
Show answer & explanation

Correct answer: C

WHY C: When both training and validation performance are poor, the model likely has high bias, and a more flexible model can reduce that bias. WHY NOT A: Further simplification usually increases bias. WHY NOT B: Less data does not solve underfitting. WHY NOT D: Changing evaluation does not fix model capacity. WHY NOT E: Random seeds do not address a systematically too-simple model.

3 Model Development

A regression target was log-transformed before training to stabilize variance. The team wants the training object itself to handle inverse transformation of predictions automatically during inference. Which tool is the best fit?

  1. AA StandardScaler applied to the target column, because it always restores predictions back to the original scale internally
  2. BA FeatureHasher, because hashing target values lets the model decode them back to raw numeric units during scoring
  3. CA GridSearchCV object, because hyperparameter search automatically reverses target transformations after refitting
  4. DA TransformedTargetRegressor, because it wraps a regressor and applies the target transform and inverse transform consistently
  5. EA KFold splitter, because each fold stores the target transformation and averages the inverse predictions afterward
Show answer & explanation

Correct answer: D

WHY D: TransformedTargetRegressor is designed to transform the target during fitting and apply the inverse transform to predictions automatically. WHY NOT A: StandardScaler alone does not wrap prediction logic for the target. WHY NOT B: Feature hashing is unrelated to target inversion. WHY NOT C: GridSearchCV does not perform inverse target transforms by itself. WHY NOT E: KFold only defines splits.

4 Model Development

An engineer wants to tune hyperparameters and perform cross-validation in one object that will refit the best model afterward. Which tool is the correct choice?

  1. AKFold, because it both defines the splits and refits the best estimator chosen from the parameter grid automatically
  2. BGridSearchCV, because it combines parameter search with cross-validation and can refit the best setting on the full training data
  3. CPipeline, because it alone compares parameter combinations and stores best_params_ after choosing a winning fold
  4. Dmetrics.get_scorer, because scorer objects coordinate all folds, select the winner, and train the final estimator
  5. Ecross_val_predict, because it tunes parameters and returns the best fitted estimator together with holdout predictions
Show answer & explanation

Correct answer: B

WHY B: GridSearchCV performs parameter search with cross-validation and can refit the best estimator on the full training set. WHY NOT A: KFold only defines splits. WHY NOT C: Pipeline organizes steps but does not search parameters alone. WHY NOT D: A scorer only evaluates. WHY NOT E: cross_val_predict is not a hyperparameter search tool.

5 Model Development

A regressor was trained on log(y) instead of y. The analyst now wants to report RMSE in dollars because the business users think in original currency units. What should happen before computing that RMSE?

  1. ACompute RMSE directly on the logged predictions and logged targets, because the units remain dollars after the log transform
  2. BStandardize the logged predictions and targets again so RMSE becomes comparable across datasets with different scales
  3. CExponentiate the predictions and the corresponding target values back to the original scale, then compute RMSE in dollars
  4. DClip negative logged predictions to zero so the metric stays in the valid range for currency-based interpretation
  5. EAverage the fold scores first and exponentiate the final RMSE afterward to convert it into original business units
Show answer & explanation

Correct answer: C

WHY C: If the goal is RMSE in original units, predictions and targets must be transformed back from log space before the metric is computed. WHY NOT A: RMSE on log values is not in dollars. WHY NOT B: Standardization does not restore units. WHY NOT D: Clipping does not solve the scale issue. WHY NOT E: Exponentiating RMSE itself is not the correct inverse operation.

6 Model Development

An engineer has four hyperparameters, each with many plausible values, and only enough budget to test a limited number of configurations. Which search method is usually more efficient than exhaustive grid search in this situation?

  1. ARandom search, because it can sample a fixed number of candidates without evaluating every possible combination
  2. BGrid search, because it always reaches the best model with fewer evaluations when the space has many unimportant parameters
  3. CManual search, because changing values by hand guarantees broader coverage of the parameter space than random sampling
  4. DFull enumeration, because evaluating the entire Cartesian product is the only budget-aware approach in high dimensions
  5. ELeaveOneOut search, because it removes one parameter value at a time until the best setting remains after elimination
Show answer & explanation

Correct answer: A

WHY A: Random search lets the user control the evaluation budget directly and is often more efficient than grid search in larger spaces. WHY NOT B: Grid search can waste trials on unimportant dimensions. WHY NOT C: Manual search is not systematically more efficient. WHY NOT D: Full enumeration is usually the least budget-friendly option. WHY NOT E: LeaveOneOut is a cross-validation scheme, not a parameter search method.

7 Model Development

A credit-risk team uses a model to rank applicants for manual review. They care most about whether risky applicants receive higher scores than safe applicants across many possible decision thresholds. Which metric is the most suitable primary choice?

  1. AROC AUC, because it measures ranking quality across thresholds rather than depending on one fixed classification cutoff
  2. BAccuracy, because it is threshold-free and always captures ranking quality better than AUC for scored classifiers
  3. CMean squared error, because risk scores should be treated as continuous regression outputs regardless of the labels
  4. DSilhouette score, because ranking applicants is equivalent to maximizing cluster separation in the score space
  5. EAdjusted Rand index, because applicant ordering is best measured as agreement between predicted and true partitions
Show answer & explanation

Correct answer: A

WHY A: ROC AUC is appropriate when the objective is threshold-independent ranking of positives above negatives. WHY NOT B: Accuracy depends on a single threshold. WHY NOT C: MSE is not the usual primary metric for labeled classification ranking. WHY NOT D: Silhouette is for clustering. WHY NOT E: Adjusted Rand index is also for clustering or partition comparison.

8 Model Development

A GridSearchCV job evaluates 4 values of alpha and 3 values of max_iter for a model, using 5-fold cross-validation. Ignoring the final refit on all training data, how many model fits occur during the search phase?

  1. A12
  2. B15
  3. C60
  4. D75
  5. E240
Show answer & explanation

Correct answer: C

WHY C: The grid has 4 x 3 = 12 parameter combinations, and each is fit on 5 folds, so 12 x 5 = 60 model fits. WHY NOT A: That counts only combinations. WHY NOT B: That is not the grid product. WHY NOT D: That overcounts. WHY NOT E: That multiplies far beyond the actual search size.

Take the full ML Associate practice test →