Databricks Certified Machine Learning Associate practice questions
Free practice, with shuffled choices and an explanation behind every answer. A little practice, a clearer next step.
Loading your practice…
From the videos
These questions come from the course videos. Information as of November 2026.
Databricks Machine Learning Associate sample questions
10 of the 167 questions, as plain text. Start a session above for shuffled choices, a score and the reason behind every choice.
After publishing station features to the online store, a team expects to query last week’s value of a feature online. What will it find?
- Only the latest value for each key
- Every past value, with its timestamp
- The weekly average for each station
- Nothing until a snapshot is published
Show the answer
Only the latest value for each key
The online store keeps only the latest values for each primary key, while the history stays in the offline Delta table. “Every past value, with its timestamp” would describe the offline table, which keeps the history. “The weekly average for each station” is wrong, since publishing copies values, without aggregating them. And “Nothing until a snapshot is published” is wrong, since any publish mode makes the latest values available online.
A battery health grade runs from 1, poor, to 5, excellent. For a linear model, what fits?
- One-hot encode it, like any category
- Take the log of the grade
- Index it by frequency with a StringIndexer
- Keep it as a number: its order is real
Show the answer
Keep it as a number: its order is real
An ordinal feature already has a real order, so a number keeps that information for a linear model. “One-hot encode it, like any category” would drop the order, and add columns that the model does not need. “Take the log of the grade” would distort a short scale that is not skewed. And “Index it by frequency with a StringIndexer” would order the grades by frequency, not by health.
A CrossValidator for a regression model must pick the model with the lowest MAE. What must be set?
- A BinaryClassificationEvaluator on the predictions
- A larger numFolds value
- A parallelism of one
- A RegressionEvaluator with the mae metric
Show the answer
A RegressionEvaluator with the mae metric
The evaluator decides which metric ranks the models, and a regression evaluator with the MAE metric does this. “A BinaryClassificationEvaluator on the predictions” would score classifiers, not regression models. “A larger numFolds value” would change the number of folds, not the metric. And “A parallelism of one” would change how many models train at once.
An inference profile shows no accuracy for the last week, though the predictions are logged. Why?
- Inference profiles compute no model metrics
- Accuracy needs a baseline table
- The labels for that week have not arrived
- The problem type is set to clustering
Show the answer
The labels for that week have not arrived
Model metrics like accuracy need the ground truth labels, which often arrive later than the predictions. “Inference profiles compute no model metrics” is wrong, since inference profiles compute accuracy once labels exist. “Accuracy needs a baseline table” is wrong, since accuracy compares predictions with labels, not with a baseline. And “The problem type is set to clustering” is wrong, since the problem type is classification or regression.
A data scientist wants a confusion matrix plot saved with the run, next to its metrics. Which call fits?
- mlflow.log_metric("confusion", fig)
- mlflow.log_figure(fig, "confusion.png")
- mlflow.set_tag("confusion", fig)
- mlflow.log_param("confusion", fig)
Show the answer
mlflow.log_figure(fig, "confusion.png")
Log figure saves a matplotlib or plotly figure as an artifact of the active run. “mlflow.log_metric("confusion", fig)” would only accept a number, not a figure. “mlflow.set_tag("confusion", fig)” would only store a short text label. And “mlflow.log_param("confusion", fig)” would only store a parameter value, as text.
Which Spark DataFrame method returns the count, the mean, the standard deviation, the minimum, and the maximum, but no percentiles?
- describe
- summary with no arguments
- approxQuantile
- crosstab
Show the answer
describe
Describe returns the count, the mean, the standard deviation, the minimum, and the maximum, while summary adds percentiles. “summary with no arguments” would add the twenty fifth, fiftieth, and seventy fifth percentiles. “approxQuantile” would only return quantiles of a column. And “crosstab” would count pairs of categories.
A model shows an R squared of −0.2 on validation data. What does it mean?
- It explains 20% of the variance
- Its RMSE is negative
- It is worse than predicting the mean
- The target must have been log transformed first
Show the answer
It is worse than predicting the mean
A negative R squared means that the model explains less than a constant prediction of the mean. “It explains 20% of the variance” would need an R squared of plus zero point two. “Its RMSE is negative” is wrong, since an RMSE is never negative. And “The target must have been log transformed first” is wrong, since R squared can be negative on any scale.
The team wants the same profile metrics for each city, besides the table as a whole. What should it add?
- A slicing expression on the city column
- A baseline table for each city
- A derived metric that is computed for each city
- A snapshot profile instead
Show the answer
A slicing expression on the city column
A slicing expression computes the same metrics for each subset, like each city, besides the table as a whole. “A baseline table for each city” would set references, without splitting the metrics by city. “A derived metric that is computed for each city” would compute a new metric, not split the existing ones. And “A snapshot profile instead” would still profile the whole table only.
A validated model version in the staging catalog must reach the prod catalog, without training again. What fits?
- set_model_version_tag with a prod value
- A transition to the Production stage
- A new run that logs the same model again
- copy_model_version, from staging to prod
Show the answer
copy_model_version, from staging to prod
Copy model version copies a registered version from one catalog to another, which promotes it without retraining. “set_model_version_tag with a prod value” would only label the version, which stays in staging. “A transition to the Production stage” is wrong, since Unity Catalog has no stages. And “A new run that logs the same model again” would create a new artifact, instead of promoting the validated one.
The corr method of a DataFrame’s statistics returns 0.92 for distance and duration. What does this say?
- Distance causes 92% of the duration
- A strong negative relationship
- A strong positive linear relationship
- No relationship at all
Show the answer
A strong positive linear relationship
A Pearson correlation close to one means that the two columns rise together, along a nearly straight line. “Distance causes 92% of the duration” is wrong, since a correlation measures neither a cause nor a share. “A strong negative relationship” would need a value close to minus one. And “No relationship at all” would need a value close to zero.
Original practice questions written for Cert Espresso, not real exam questions.