10 free Databricks Machine Learning Professional practice questions with the correct answer and a full explanation for each, taken from the CertStash pack of 216 questions. Work through them, then open each answer to check your reasoning.
Get all 216 questions (US$39) · Download these 10 as a PDF
Question 1
Which of the following describes concept drift?
Show answer and explanation
Correct answer: C. Concept drift is when there is a change in the relationship between input variables and target variables
Concept drift occurs when the underlying relationship between input features and the target variable changes over time, even if the distributions of individual variables remain constant. This is fundamentally different from feature drift (changes in input distributions) or label drift (changes in target distribution). The model's decision boundaries or the predictive pattern becomes invalid as the relationship shifts.
Why the other options are wrong
- A. This describes feature drift, not concept drift.
- B. This describes label drift or target drift, not concept drift.
- D. Changes in predictions alone do not define concept drift; predictions change as a symptom when concept drift occurs.
- E. Option C correctly describes concept drift.
Question 2
A machine learning engineer is monitoring categorical input variables for a production machine learning application. The engineer believes that missing values are becoming more prevalent in more recent data for a particular value in one of the categorical input variables.
Which of the following tools can the machine learning engineer use to assess their theory?
Show answer and explanation
Correct answer: B. One-way Chi-squared Test
A one-way Chi-squared test is appropriate for testing whether the distribution of a single categorical variable has changed over time. The engineer can create a contingency table comparing the frequency of each categorical value (including missing values) between recent and historical data, then apply the Chi-squared test to determine if the distributions differ significantly.
Why the other options are wrong
- A. The Kolmogorov-Smirnov test is designed for continuous numeric distributions, not categorical data.
- C. A two-way Chi-squared test is used when examining the relationship between two categorical variables, but here we're monitoring one variable across time periods.
- D. Jensen-Shannon distance measures distributional divergence but is typically applied to numeric or probability distributions, not categorical missing value patterns.
- E. Option B is appropriate for this task.
Question 3
A data scientist is using MLflow to track their machine learning experiment. As a part of each MLflow run, they are performing hyperparameter tuning. The data scientist would like to have one parent run for the tuning process with a child run for each unique combination of hyperparameter values.
They are using the following code block:
The code block is not nesting the runs in MLflow as they expected.
Which of the following changes does the data scientist need to make to the above code block so that it successfully nests the child runs under the parent run in MLflow?

Show answer and explanation
Correct answer: A. Indent the child run blocks within the parent run block
In MLflow, nested runs are created through code indentation within the parent run's context manager. The child runs must be indented inside the parent run's `with` block to establish the parent-child relationship. The `nested=True` parameter on child runs is actually unnecessary and can be omitted since nesting is determined by the contextual hierarchy of the `with` statements. The current code shows the child run blocks at the same indentation level as the parent run's print statement, placing them outside the parent run's scope, which prevents proper nesting. Moving the child run blocks to be indented within the parent run's context manager will establish the correct hierarchical relationship.
Why the other options are wrong
- B. Adding nested=True to the parent run does nothing to establish nesting; the parent run doesn't need this parameter.
- C. Removing nested=True from child runs alone without indenting them within the parent context will not create the nesting structure.
- D. Using the same run_name for all three runs would create conflicts and confusion in tracking, not establish nesting relationships.
- E. While removing nested=True from child runs is harmless, adding it to the parent run is unnecessary and incorrect; only proper indentation is needed.
Question 4
A machine learning engineer wants to log feature importance data from a CSV file at path importance_path with an MLflow run for model model.
Which of the following code blocks will accomplish this task inside of an existing MLflow run block?

Show answer and explanation
Correct answer: D. mlflow.log_artifact(importance_path, "feature-importance.csv")
The correct method to log a CSV file as an artifact in MLflow is mlflow.log_artifact(), which takes the file path as the first argument and an optional artifact path as the second argument. Option A uses mlflow.log_model_and_data(), which is designed for logging both a model and associated data in a specific format, not for general CSV file logging. Option B uses mlflow.log_model(), which is intended for logging trained models, not data files. Option C uses mlflow.log_data(), which does not exist as a standard MLflow API function. Option D correctly uses mlflow.log_artifact() to log the CSV file at importance_path to MLflow, with the second parameter specifying the artifact path within the run.
Why the other options are wrong
- A. mlflow.log_model_and_data() is for logging models with associated data in a specific structured format, not for general CSV artifact logging.
- B. mlflow.log_model() is designed to log trained models to MLflow, not to log feature importance data files.
- C. mlflow.log_data() is not a valid MLflow function; the correct function for logging files is mlflow.log_artifact().
- E. This option is incorrect because option D successfully accomplishes the task.
Question 5
Which of the following is a simple, low-cost method of monitoring numeric feature drift?
Show answer and explanation
Correct answer: B. Summary statistics trends
Summary statistics trends (mean, median, standard deviation, quartiles) provide a lo-ost, computationally simple method to monitor numeric feature drift over time. By tracking how these statistics change across time windows, drift becomes apparent without requiring complex statistical tests. This approach requires minimal computation and is easily interpretable.
Why the other options are wrong
- A. Jensen-Shannon test is more complex and computationally intensive than simple summary statistics.
- C. Chi-squared test is designed for categorical data, not numeric features.
- D. Summary statistics can effectively monitor feature drift.
- E. While the Kolmogorov-Smirnov test can detect drift, it is more complex than tracking summary statistics trends.
Question 6
A data scientist has developed a model to predict ice cream sales using the expected temperature and expected number of hours of sun in the day. However, the expected temperature is dropping beneath the range of the input variable on which the model was trained.
Which of the following types of drift is present in the above scenario?
Show answer and explanation
Correct answer: E. Feature drift
Feature drift occurs when the distribution of input features changes over time. In this scenario, the expected temperature is dropping beneath the range seen in training data, meaning the feature distribution has shifted. This is a classic example of feature drift where the model encounters input values outside its training range, potentially leading to poor predictions.
Why the other options are wrong
- A. Label drift refers to changes in the target variable distribution, not input feature distribution.
- B. Feature drift is the correct classification.
- C. Concept drift involves changes in the relationship between features and target; here the distribution of the input feature itself has changed.
- D. Prediction drift refers to changes in model outputs, which is a symptom rather than the primary drift type occurring here.
Question 7
A data scientist wants to remove the star_rating column from the Delta table at the location path. To do this, they need to load in data and drop the star_rating column.
Which of the following code blocks accomplishes this task?
Show answer and explanation
Correct answer: A. spark.read.format(“delta”).load(path).drop(“star_rating”)
The code `spark.read.format("delta").load(path).drop("star_rating")` correctly loads a Delta table from the specified path using the Delta format and removes the specified column. This is the standard Spark API for reading Delta tables and performing transformations. The result is a modified DataFrame without the star_rating column.
Why the other options are wrong
- B. The `.table()` method is not used with paths in this manner; it's used for registered catalog tables.
- C. Delta tables can be modified through transformations like drop().
- D. While `spark.read.table()` can work with registered tables, it requires the table to be registered in the catalog first, not a file path.
- E. This SQL syntax is valid for some systems but not the standard Spark/Delta approach for this operation.
Question 8
Which of the following operations in Feature Store Client fs can be used to return a Spark DataFrame of a data set associated with a Feature Store table?
Show answer and explanation
Correct answer: E. fs.read_table
The `fs.read_table()` method is the Feature Store Client operation used to retrieve data from a Feature Store table and return it as a Spark DataFrame. This method allows data scientists to read feature data for use in model training or inference workflows.
Why the other options are wrong
- A. fs.create_table creates a new Feature Store table but does not read or return existing data.
- B. fs.write_table writes or updates data in Feature Store tables rather than retrieving it.
- C. fs.get_table may retrieve table metadata but does not return the actual data as a DataFrame.
- D. The Feature Store Client provides methods for this task.
Question 9
A machine learning engineer is in the process of implementing a concept drift monitoring solution. They are planning to use the following steps:
1. Deploy a model to production and compute predicted values
2. Obtain the observed (actual) label values
3. _____
4. Run a statistical test to determine if there are changes over time
Which of the following should be completed as Step #3?
Show answer and explanation
Correct answer: E. Compute the evaluation metric using the observed and predicted values
After obtaining predicted values and observed actual labels, the next logical step is to compute an evaluation metric (such as accuracy, precision, recall, or AUC) using both the predicted and observed values. This metric then becomes the subject of statistical testing in Step 4 to detect whether model performance has degraded due to concept drift. Tracking evaluation metrics over time reveals whether the relationship between features and targets has changed.
Why the other options are wrong
- A. Obtaining feature values is not necessary at this stage since predictions have already been made.
- B. Measuring prediction latency is unrelated to detecting concept drift.
- C. Retraining occurs after drift is confirmed, not before determining if drift exists.
- D. Computing evaluation metrics is essential for concept drift detection.
Question 10
Which of the following is a reason for using Jensen-Shannon (JS) distance over a Kolmogorov-Smirnov (KS) test for numeric feature drift detection?
Show answer and explanation
Correct answer: A. All of these reasons
Jensen-Shannon distance has multiple advantages over the Kolmogorov-Smirnov test for numeric feature drift detection. JS is more robust with large datasets (avoiding p-value inflation issues), it is symmetric and provides normalized divergence measures, it doesn't require manual threshold determination like KS test p-values, and it provides smoothed comparisons between distributions. All of these reasons make JS a compelling choice for production drift monitoring.
Why the other options are wrong
- B. JS distance is actually normalized and smoothed, making it better for drift detection.
- C. Multiple valid reasons support using JS over KS for this application.
- D. While robustness with large datasets is one advantage, there are other reasons as well.
- E. JS does not require manual thresholds, but KS does (p-value determination), and this is only one of several advantages.
That was 10 of 216.
The full Databricks Machine Learning Professional pack has all 216 questions, each with the answer, the explanation and why the other options are wrong, plus a questions-only copy for timed runs. US$39, paid once, with free monthly updates and a pass-or-your-money-back guarantee.
