Sign in
Home/Databricks/Certified Machine Learning Professional/Free questions

Certified Machine Learning Professional — Free Practice Questions

10 free sample questions from a bank of 60, with the correct answers and explanations. No signup required — start practising right now.

1Which of the following describes concept drift?
  • Concept drift is when there is a change in the distribution of an input variable
  • Concept drift is when there is a change in the distribution of a target variable
  • Concept drift is when there is a change in the relationship between input variables and target variables
  • Concept drift is when there is a change in the distribution of the predicted target given by the model
  • None of these describe Concept drift
Answer: C

The short version

Answer C — concept drift is a change in the relationship between inputs and the target, not just a shift in inputs or labels alone.

Key concepts in this question

Concept drift vs data drift vs label drift, P(y|X) relationship change, model staleness over time.

Why C is correct

C states the textbook definition: P(y|X) changes, so a model learned on old mapping becomes less accurate even if input ranges look similar. The vendor prose corroborates this relationship-change definition.

Why the others are wrong

A describes covariate / data drift in an input, not concept drift. B describes prior / label drift in the target distribution. D describes prediction-distribution shift, a symptom rather than the definition. E is incorrect because C is correct.

Certified-Machine-Learning-Professional exam tip

Memorize the trio: input shift = data/covariate drift, target shift = label/prior drift, relationship shift = concept drift.

2Which of the following is a reason for using Jensen-Shannon (JS) distance over a Kolmogorov-Smirnov (KS) test for numeric feature drift detection?
  • All of these reasons
  • JS is not normalized or smoothed
  • None of these reasons
  • JS is more robust when working with large datasets
  • JS does not require any manual threshold or cutoff determinations
Answer: D

The short version

Answer D — Jensen-Shannon distance is preferred for large-scale numeric drift because it stays stable where KS becomes oversensitive.

Key concepts in this question

Numeric feature drift detection, Jensen-Shannon distance properties, Kolmogorov-Smirnov sensitivity to sample size, threshold selection.

Why D is correct

KS p-values flag trivial differences as significant when n is very large. JS distance is bounded, smoothed and symmetric, giving a comparable magnitude of divergence that remains interpretable at scale, hence more robust on large datasets.

Why the others are wrong

A cannot hold because B, C and E are false. B reverses the fact: JS is normalized and smoothed. C is incorrect because D is valid. E is incorrect: JS still needs a business threshold for alerting; only the 0-1 scaling aids interpretation, it does not eliminate cutoffs.

Certified-Machine-Learning-Professional exam tip

If the exam mentions large datasets plus KS vs JS, choose JS robustness; remember KS = hypothesis-test p-value problem at scale.

3A data scientist is utilizing MLflow to track their machine learning experiments. After completing a series of runs for the experiment with experiment ID exp_id, the data scientist wants to programmatically work with the experiment run data in a Spark DataFrame. They have an active MLflow Client client and an active Spark session spark. Which of the following lines of code can be used to obtain run-level results for exp_id in a Spark DataFrame?
  • client.list_run_infos(exp_id)
  • spark.read.format("delta").load(exp_id)
  • There is no way to programmatically return row-level results from an MLflow Experiment.
  • mlflow.search_runs(exp_id)
  • spark.read.format("mlflow-experiment").load(exp_id)
Answer: E

The short version

Use spark.read.format("mlflow-experiment").load(exp_id) to get run-level results for an experiment as a Spark DataFrame.

Key concepts in this question

  • MLflow experiment search vs Spark DataFrame load
  • mlflow-experiment Spark data source format documented at docs.databricks.com/en/query/formats/mlflow-experiment.html
  • Difference between client.list_run_infos, mlflow.search_runs, and Spark read.format.load

Why E is correct

E matches the vendor-selected data source: spark.read.format("mlflow-experiment").load(exp_id) loads experiment exp_id run-level results directly as a Spark DataFrame, satisfying the requirement for programmatic Spark work with an active spark session.

Why the others are wrong

  • A client.list_run_infos(exp_id) returns RunInfo objects via the MLflow Client, not a Spark DataFrame.
  • B spark.read.format("delta").load(exp_id) treats exp_id as a Delta path, which is the wrong format and source for MLflow experiment data.
  • C claims there is no way to return results programmatically, which contradicts the documented mlflow-experiment format.
  • D mlflow.search_runs(exp_id) returns pandas results for fluent search, not a Spark DataFrame load via spark.read.

Certified-Machine-Learning-Professional exam tip

When the stem asks for Spark DataFrame + experiment ID, choose format("mlflow-experiment").load(exp_id) over search_runs or list_run_infos.

4A data scientist has developed and logged a scikit-learn random forest model model, and then they ended their Spark session and terminated their cluster. After starting a new cluster, they want to review the feature_importances_ of the original model object. Which of the following lines of code can be used to restore the model object so that feature_importances_ is available?
  • mlflow.load_model(model_uri)
  • client.list_artifacts(run_id)["feature-importances.csv"]
  • mlflow.sklearn.load_model(model_uri)
  • This can only be viewed in the MLflow Experiments UI
  • client.pyfunc.load_model(model_uri)
Answer: C

The short version

Answer C — reload a scikit-learn flavor model with mlflow.sklearn.load_model to get the native object back, including feature_importances_.

Key concepts in this question

MLflow flavors, sklearn native object vs pyfunc wrapper, model_uri format, cluster restart persistence.

Why C is correct

The model was logged as a sklearn flavor, which preserves the pickle plus metadata. mlflow.sklearn.load_model restores the RandomForest object itself, so attributes like feature_importances_ are available again in the new session.

Why the others are wrong

A mlflow.load_model is not the valid API name. B list_artifacts only lists files, it does not deserialize a model. D is false: the UI is convenient but not required for access. E pyfunc.load_model returns a generic PythonModel wrapper without sklearn attributes like feature_importances_.

Certified-Machine-Learning-Professional exam tip

Match load to log flavor: sklearn model needs mlflow.sklearn.load_model; pyfunc load loses native attributes.

5Which of the following is a simple statistic to monitor for categorical feature drift?
  • Mode
  • None of these
  • Mode, number of unique values, and percentage of missing values
  • Percentage of missing values
  • Number of unique values
Answer: C

The short version

For categorical feature drift, monitor mode, number of unique values, and percentage of missing values together.

Key concepts in this question

  • Categorical vs numerical drift statistics
  • Summary statistics: mode, cardinality, missingness
  • Simple monitoring that captures distribution shift and data-quality change

Why C is correct

C is the vendor-selected full set: Mode, number of unique values, and percentage of missing values. Together they capture central tendency for categories, cardinality expansion or collapse, and missing-value spikes, which single statistics alone miss.

Why the others are wrong

  • A Mode alone misses new or lost categories and missingness changes.
  • D Percentage of missing values alone misses distribution or cardinality drift.
  • E Number of unique values alone misses mode shift and missingness.
  • B None of these is incorrect because C lists the documented categorical summary statistics.

Certified-Machine-Learning-Professional exam tip

If categorical drift offers a combo option with mode + unique count + missing, prefer the combo over any single statistic.

6Which of the following is a probable response to identifying drift in a machine learning application?
  • None of these responses
  • Retraining and deploying a model on more recent data
  • All of these responses
  • Rebuilding the machine learning application with a new label variable
  • Sunsetting the machine learning application
Answer: B

The short version

Answer B — the standard first response to confirmed drift is retrain and redeploy on more recent data.

Key concepts in this question

Drift remediation, retraining, redeployment, monitoring loop, vs rebuild vs sunset.

Why B is correct

Drift means P(X) or P(y|X) moved. Refreshing the training window re-aligns the model to current distribution and restores performance without redesigning the application.

Why the others are wrong

A is incorrect because B is valid. C is incorrect because only B is broadly probable; rebuilding labels or sunsetting are extreme cases. D rebuilding with a new label is a re-scoping project, not routine drift response. E sunsetting is last-resort when the use case is no longer viable.

Certified-Machine-Learning-Professional exam tip

Default drift playbook for the exam: detect, retrain on recent data, redeploy, keep monitoring.

7A data scientist would like to enable MLflow Autologging for all machine learning libraries used in a notebook. They want to ensure that MLflow Autologging is used no matter what version of the Databricks Runtime for Machine Learning is used to run the notebook and no matter what workspace-wide configurations are selected in the Admin Console. Which of the following lines of code can they use to accomplish this task?
  • mlflow.sklearn.autolog()
  • mlflow.spark.autolog()
  • spark.conf.set(“autologging”, True)
  • It is not possible to automatically log MLflow runs.
  • mlflow.autolog()
Answer: E

The short version

Answer E — mlflow.autolog() enables autologging for all supported libraries regardless of runtime defaults or admin settings.

Key concepts in this question

MLflow Autologging scope, mlflow.autolog vs flavor-specific autolog, Databricks Runtime ML defaults, workspace admin overrides.

Why E is correct

The generic mlflow.autolog() turns on autologging for every installed supported flavor upon import, overriding version-specific defaults and workspace-level toggles, which flavor-specific calls cannot guarantee across runtimes.

Why the others are wrong

A only covers sklearn and misses other libraries. B only covers Spark ML. C spark.conf.set is not an MLflow API. D is false: automatic logging is possible via autolog.

Certified-Machine-Learning-Professional exam tip

All libraries no matter what = mlflow.autolog(); single library = mlflow.<flavor>.autolog().

8After a data scientist noticed that a column was missing from a production feature set stored as a Delta table, the machine learning engineering team has been tasked with determining when the column was dropped from the feature set. Which of the following SQL commands can be used to accomplish this task?
  • VERSION
  • DESCRIBE
  • HISTORY
  • DESCRIBE HISTORY
  • TIMESTAMP
Answer: D

The short version

Answer D — use DESCRIBE HISTORY on the Delta table to find when the column was dropped.

Key concepts in this question

Delta Lake time travel, DESCRIBE HISTORY metadata, versioning, schema change audit.

Why D is correct

DESCRIBE HISTORY returns operation, timestamp, user and parameters for every table version, including ALTER / DROP COLUMN events, so the team can pinpoint the version and time the column disappeared.

Why the others are wrong

A VERSION alone is just a number, not a command that shows history. B DESCRIBE only shows current schema, not change log. C HISTORY alone is not valid Spark SQL syntax. E TIMESTAMP is used in time-travel reads, not to list the audit log itself.

Certified-Machine-Learning-Professional exam tip

Audit question = DESCRIBE HISTORY; read old data question = TIMESTAMP AS OF / VERSION AS OF.

9Which of the following describes label drift?
  • Label drift is when there is a change in the distribution of the predicted target given by the model
  • None of these describe label drift
  • Label drift is when there is a change in the distribution of an input variable
  • Label drift is when there is a change in the relationship between input variables and target variables
  • Label drift is when there is a change in the distribution of a target variable
Answer: E

The short version

Answer E — label drift is a change in the distribution of the target variable itself.

Key concepts in this question

Label / prior drift vs concept drift vs covariate drift, P(y) shift.

Why E is correct

Label drift means the class balance or target distribution in production differs from training, e.g. far more positives, which degrades thresholds and metrics even if inputs are stable.

Why the others are wrong

A describes prediction drift, the model output shift. B is incorrect because E is correct. C describes input / covariate drift. D describes concept drift, the change in P(y|X) relationship.

Certified-Machine-Learning-Professional exam tip

Pair this with concept drift: label = P(y) moved, concept = P(y|X) moved.

10Which of the following machine learning model deployment paradigms is the most common for machine learning projects?
  • On-device
  • Streaming
  • Real-time
  • Batch
  • None of these deployments
Answer: D

The short version

Batch is the most common ML deployment paradigm.

Key concepts in this question

  • Deployment paradigms: batch, real-time, streaming, on-device
  • Frequency and latency tradeoffs in ML projects
  • Vendor prose states batch is typically most widely used

Why D is correct

D Batch matches the vendor-selected answer and thin prose that the most widely used deployment paradigm is typically batch, reflecting offline scheduled scoring that fits most ML projects.

Why the others are wrong

  • A On-device is specialized for edge constraints, not the most common general case.
  • B Streaming is for continuous event scoring, less common than scheduled batch.
  • C Real-time is for low-latency per-record serving, a subset of use cases.
  • E None of these deployments contradicts the documented prevalence of batch.

Certified-Machine-Learning-Professional exam tip

Unless the stem stresses per-record immediacy or edge, default most-common-paradigm questions to batch.

Want the full bank of 60 questions for Certified Machine Learning Professional? See all practice exams.