A data scientist has replaced missing values in their feature set with each respective feature variable's median value. A colleague suggests that the data scientist is throwing away valuable information by doing this. Which of the following approaches can they take to include as much information as possible in the feature set?
-
A
Impute the missing values using each respective feature variable's mean value instead of the median value
-
B
Refrain from imputing the missing values in favor of letting the machine learning algorithm determine how to handle them
-
C
Remove all feature variables that originally contained missing values from the feature set
-
D
Create a binary feature variable for each feature that contained missing values indicating whether each row's value has been imputed
-
E
Create a constant feature variable for each feature that contained missing values indicating the percentage of rows from the feature that was originally missing
Reveal answer details
Close answer details
Correct answerD
ExplanationReplacing a missing value with the median fills the numeric field but removes the distinction between an observed median and an imputed value. A binary feature for each affected variable preserves that distinction by indicating whether each row has been imputed. The model can then use both the filled value and the missingness pattern.
A data scientist is considering two common model deployment patterns: Promoting the model artifact towards production (deploy model) Promoting the code that products the model artifact towards production (deploy code)  Which scenario is inappropriate for the deploy model approach?
-
A
The data scientist is not working with external repos or a CI/CD process.
-
B
Model training is very expensive or hard to reproduce.
-
C
Production data is not accessible from the development environment.
-
D
All work is done in a single Databricks workspace.
Reveal answer details
Close answer details
Correct answerC
ExplanationDeploying a model artifact means the artifact is trained before it is promoted toward production. If production data cannot be accessed from the development environment, development cannot reproduce training that depends on that data, making artifact promotion inappropriate for this setup. Promoting code allows training to occur in the environment where the required data is available.
A machine learning engineer has been notified that a new Staging version of a model registered to the MLflow Model Registry has passed all tests. As a result, the machine learning engineer wants to put this model into production by transitioning it to the Production stage in the Model Registry. From which of the following pages in Databricks Machine Learning can the machine learning engineer accomplish this task?
-
A
The home page of the MLflow Model Registry
-
B
The experiment page in the Experiments observatory
-
C
The model version page in the MLflow ModelRegistry
-
D
The model page in the MLflow Model Registry
Reveal answer details
Close answer details
Correct answerC
ExplanationA stage transition applies to a particular registered model version, not merely to the registered model name or an experiment run. The model version page in the MLflow Model Registry provides the context for moving that tested version from Staging to Production. The broader registry and model pages do not identify the specific version being transitioned.
What is the name of the method that transforms categorical features into a series of binary indicator feature variables?
-
A
-
B
-
C
-
D
-
E
Reveal answer details
Close answer details
Correct answerC
ExplanationOne-hot encoding creates a separate binary indicator feature for each represented category. For a given row, the indicator associated with its category is active while the others are inactive. String indexing instead maps categories to numeric indices, and target or leave-one-out encoding derives numeric values from relationships with the target.
A machine learning engineer is trying to scale a machine learning pipeline by distributing its single-node model tuning process. After broadcasting the entire training data onto each core, each core in the cluster can train one model at a time. Because the tuning process is still running slowly, the engineer wants to increase the level of parallelism from 4 cores to 8 cores to speed up the tuning process. Unfortunately, the total memory in the cluster cannot be increased. In which of the following scenarios will increasing the level of parallelism from 4 to 8 speed up the tuning process?
-
A
When the tuning process in randomized
-
B
When the entire data can fit on each core
-
C
When the model is unable to be parallelized
-
D
When the data is particularly long in shape
-
E
When the data is particularly wide in shape
Reveal answer details
Close answer details
Correct answerB
ExplanationEach core receives a complete copy of the training data and trains one model, so raising parallelism doubles the number of simultaneous copies from four to eight. With fixed cluster memory, this speeds tuning only when the entire data can fit in the memory available to each core. Otherwise, memory pressure prevents the extra concurrent model fits from operating efficiently.
A data scientist has completed a featurization process on a new dataset. They are considering if the resulting features should be saved to an online or offline feature table. They know that the features will be used primarily for real-time inference. After some thought, they decide to use an online feature table instead of an offline feature table. What aspect of online feature tables enabled their decision for this scenario?
-
A
They prioritize low-latency access and are optimized for point lookups, typically supported by key-value stores or column-oriented databases.
-
B
They only support real-time inference so they are the only option.
-
C
They support both batch and real-time inference equally in terms of cost and performance, providing the most flexibility.
-
D
They prioritize batch inference and leverage traditional data warehouses or data lakes, making them more cost-effective.
Reveal answer details
Close answer details
Correct answerA
ExplanationReal-time inference needs feature values to be retrieved quickly for an individual customer or request. Online feature tables prioritize low-latency access and are optimized for point lookups, commonly through storage patterns suited to key-based retrieval. Offline tables are better aligned with large batch reads and do not provide the same serving-oriented access pattern.
A data scientist is using the following code block to tune hyperparameters for a machine learning model:  Which change can they make the above code block to improve the likelihood of a more accurate model?
-
A
Increase num_evals to 100
-
B
-
C
Change sparkTrials() to Trials()
-
D
Change tpe.suggest to random.suggest
Reveal answer details
Close answer details
Correct answerA
ExplanationThe code permits only four objective-function evaluations, so Hyperopt can examine very few points in the search space. Increasing num_evals to 100 gives the Tree of Parzen Estimators search many more opportunities to test and refine hyperparameter choices, improving the likelihood that it discovers a more accurate configuration.
A data scientist has defined a Pandas UDF function predict to parallelize the inference process for a single-node model:  They have written the following incomplete code block to use predict to score each record of Spark DataFramespark_df:  Which of the following lines of code can be used to complete the code block to successfully complete the task?
-
A
predict(*spark_df.columns)
-
B
-
C
predict(Iterator(spark_df))
-
D
mapInPandas(predict(spark_df.columns))
-
E
predict(spark_df.columns)
Reveal answer details
Close answer details
Correct answerA
ExplanationThe new prediction field requires a Spark column expression produced by the registered Pandas UDF. Calling predict(*spark_df.columns) expands the DataFrame's columns into separate UDF arguments. For each batch, the function concatenates those feature inputs into a Pandas DataFrame, runs the loaded model, and yields a prediction series that Spark places in the new column.
A machine learning engineer has developed a classification model to predict whether a customer will renew their gym membership. They are unsure if the model they developed is accurate enough to be used in a production environment. Which evaluation metric should they use to assess the model's performance?
-
A
Root Mean Squared Error (RMSE)
-
B
Mean Absolute Error (MAE)
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationMembership renewal is a classification outcome, so the evaluation should measure the classifier's ability to distinguish renewals from non-renewals. ROC-AUC summarizes ranking performance across classification thresholds by relating true-positive and false-positive behavior. RMSE, MAE, and R-Squared are regression metrics for continuous numerical outcomes.
Question 10
Single choice
The data science team at a retailer has developed a custom MLflow pyfunc model with private Python dependencies. They now want to deploy and serve the model for real-time inference using Databricks Model Serving. However, they are getting dependency errors during deployment. Which is the correct approach to resolve the issue?
-
A
Add the dependencies to the MLflow model using the add_libraries_to_model method
-
B
Log the dependencies separately using the log_dependencies method
-
C
Log the dependencies together with the model using log_model method with pip_requirements or extra_pip_requirements parameter
-
D
Use an MLflow native flavor model instead of the custom pyfunc model
Reveal answer details
Close answer details
Correct answerC
ExplanationThe serving environment must receive the private Python dependencies together with the custom pyfunc model. Supplying pip_requirements or extra_pip_requirements to log_model records those packages as part of the model's environment specification, allowing deployment to install what inference needs. Logging dependencies separately would not bind them to the served model artifact.
Question 11
Single choice
A data scientist wants to tune a set of hyperparameters for a machine learning model. They have wrapped a Spark ML model in the objective function objective_function and they have defined the search space search_space. As a result, they have the following code block:  Which of the following changes do they need to make to the above code block in order to accomplish the task?
-
A
Change SparkTrials() to Trials()
-
B
Reduce num_evals to be less than 10
-
C
-
D
Remove the trials=trials argument
-
E
Remove the algo=tpe.suggest argument
Reveal answer details
Close answer details
Correct answerA
ExplanationThe objective function already contains a Spark ML model, whose fitting work uses Spark itself. SparkTrials would attempt to distribute objective evaluations while those evaluations also submit Spark work. Replacing SparkTrials() with Trials() keeps the Hyperopt evaluations on the driver so each objective call can run the Spark ML training process.
Question 12
Single choice
Which of the following tools can be used to distribute large-scale feature engineering without the use of a UDF or pandas Function API for machine learning pipelines?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationSpark ML supplies DataFrame-based feature transformers and estimators that execute through Spark's distributed processing engine. It can therefore perform large-scale feature engineering directly in a machine learning pipeline without wrapping the logic in a UDF or pandas Function API. The other listed libraries primarily target model development outside this Spark transformation framework.
Question 13
Single choice
A machine learning engineer is converting a decision tree from sklearn to Spark ML. During the training process following this conversion, they receive the following error describing that need to set the maxBins parameter to at least 515 (or remove the feature):  Which of the following results in Spark ML needing the maxBins parameter to be at least as large as the number values in each categorical feature?
-
A
Spark ML tests a limit of 32 split candidates for categorical features in the splitting algorithm
-
B
Spark ML needs more split candidates in the splitting algorithm than single-node implementations
-
C
Spark ML needs at least one bin for each category in each categorical feature
-
D
Spark ML tests only categorical features in the splitting algorithm
Reveal answer details
Close answer details
Correct answerC
ExplanationA categorical split must distinguish the feature's categories, so Spark ML requires at least one bin for every category represented by that feature. Feature 49 has 515 values, which exceeds the current maxBins value of 32. Raising maxBins to at least 515 gives the splitting algorithm enough bins to represent all of those categories.
Question 14
Single choice
A machine learning engineer working for an Energy Distributor wants to perform a time-series forecast of critical turbines sensor measures. Here is the feature set under consideration:  The machine learning engineer creates a first model and gets a higher than expected RMSE. They believe the model can be improved using data imputation. They will use data science best practices for imputation. Which data imputation strategy is most likely to enhance the dataset's quality and predictive performance?
-
A
For sensor type use mode, for temperature and vibration use mean (per day).
-
B
They can just remove all out of range values and missing values from the training set.
-
C
For sensor type use mode, for temperature use median (per day) and for vibration use mean (per day).
-
D
For sensor type use mode, for temperature use mean (per day) and for vibration use median (per day).
Reveal answer details
Close answer details
Correct answerC
ExplanationSensor type is categorical, so its mode supplies the most frequent valid category. Temperature measurements are skewed, making the per-day median resistant to that asymmetry. Vibration values are normally distributed apart from identified out-of-range observations, so the per-day mean represents their central level after invalid extremes are handled. Daily grouping also respects the stated time-dependent behavior of the measurements.
Question 15
Single choice
A machine learning engineer at a health insurance company is going to deploy a model in Databricks to a real-time Model Serving endpoint. The Model Serving endpoint is in the company's development environment so that other teams can test the endpoint and model. The company is very cost conscious when it comes to IT spend and the engineer knows that the model only needs to be tested during normal business hours. They want to use the least amount of effort to reduce the overall cost of hosting the model using a real-time Model Serving endpoint. What approach does this?
-
A
Delete the endpoint at the end of business hours and recreate it at the beginning of business hours.
-
B
Set the Compute scale-out to Small.
-
C
Set Scale to zero in the endpoint s configuration.
-
D
Turn the endpoint off at the end of business hours and turn it back on at the beginning of business hours.
Reveal answer details
Close answer details
Correct answerC
ExplanationEnabling Scale to zero in the endpoint configuration allows serving compute to scale down when the development endpoint receives no requests. Because testing occurs only during business hours, this reduces idle hosting cost without requiring the engineer to delete and recreate the endpoint each day. It therefore meets both the cost and low-effort requirements.
Question 16
Single choice
A data scientist is tasked with building a predictive model for a healthcare application that identifies patients at risk of developing a rare disease. The dataset is highly imbalanced, with only 1% of the samples representing patients with the disease. This imbalance is causing the model to predict the majority class (healthy patients) almost exclusively, resulting in poor detection of the rare disease cases. They need to address this class imbalance to improve the model's performance on the minority class. Which strategy should they implement to effectively mitigate the class imbalance in their training data?
-
A
Apply an oversampling technique to increase the number of samples from the minority class (patients with the disease).
-
B
Perform dimensionality reduction to decrease the number of features in the dataset
-
C
Increase the number of epochs during model training to allow the model to learn better from the data.
-
D
Implement a cross-validation technique to ensure the model generalizes well to unseen data.
Reveal answer details
Close answer details
Correct answerA
ExplanationWith only 1% diseased cases, the minority class contributes too few training examples and the model can favor the healthy majority. Oversampling increases the number of minority-class patient samples presented during training, giving the learner more opportunity to capture rare-disease patterns. More epochs or cross-validation does not change the class representation.
Question 17
Single choice
A data scientist is developing a machine learning pipeline using AutoML on Databricks Machine Learning. Which of the following steps will the data scientist need to perform outside of their AutoML experiment?
-
A
-
B
-
C
-
D
Exploratory data analysis
Reveal answer details
Close answer details
Correct answerC
ExplanationThe AutoML experiment covers the model-development work represented by exploratory analysis, candidate training and tuning, and evaluation of trial results. Deployment occurs after that experiment: the chosen model must be taken from experimentation into an environment where it can serve predictions. It is therefore a downstream operational step rather than an activity completed within the AutoML experiment itself.
Question 18
Single choice
A health organization is developing a classification model to determine whether or not a patient currently has a specific type of infection. The organization's leaders want to maximize the number of positive cases identified by the model. Which of the following classification metrics should be used to evaluate the model?
-
A
-
B
-
C
Area under the residual operating curve
-
D
-
E
Reveal answer details
Close answer details
Correct answerE
ExplanationRecall measures the proportion of actual positive cases that the classifier identifies as positive. Maximizing recall therefore reduces the number of infected patients missed as false negatives and directly matches the goal of finding as many positive cases as possible. Precision instead emphasizes how many predicted positives are truly positive.
Question 19
Single choice
A data scientist has a Spark DataFrame df of new customers that they would like to add to their existing customer feature table in Unity Catalog. The following parameters are available for them to use when writing to the feature table. name - the name of the feature table to write to. df - a Spark DataFrame with feature data to be written to the feature table. mode - the write operation to use when writing to the feature table (e.g. merge) primary key - the primary key of the feature table. Using the Databricks Feature Store, if the FeatureEngineeringClient is instantiated, what are the minimum parameters required for the write_table function?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
Explanationwrite_table needs name to identify the existing feature table and df to provide the feature rows being written. The table already has its primary-key definition, so that key is not supplied again for this write. A mode can control the write operation, but it is not part of the minimum required parameter set described here.
Question 20
Single choice
Which of the following machine learning algorithms typically uses bagging?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationRandom forest applies bagging by training many decision trees on sampled versions of the training data and then combining their predictions. The trees can be fitted independently, and aggregation reduces the instability of relying on one tree. Gradient boosting instead builds trees sequentially so later trees address the errors of the existing ensemble.
Question 21
Single choice
A data scientist has run several trials with different parameters and logged them under an MLflow experiment churn_prediction. Now they want to retrieve the run that performed best according to certain model metrics. How can the data scientist perform this task?
-
A
Use the mlflow.get_best_run() function with the necessary filter
-
B
Use the mlflow.client.MlflowClient.search_runs() function with search_all_experiments=True and filter on the pandas DataFrame returned.
-
C
Use the mlflow.get_experiment() function to retrieve the experiment. Filter on the runs property which has the list of all metadata for each run including the model metric
-
D
Use the mlflow.search_runs() function with the experiment name and filter on the pandas DataFrame returned.
Reveal answer details
Close answer details
Correct answerD
Explanationmlflow.search_runs() retrieves runs for the specified experiment in a tabular result that includes logged metrics and parameters. The data scientist can identify churn_prediction by name, obtain its runs, and filter or sort the returned pandas DataFrame by the target metric to select the best-performing run. No separate get_best_run operation is needed.
Question 22
Single choice
A machine learning engineer in a telecommunications company wants to create a predictive model to predict customer churn using Databricks. The required dataset has been prepared and is available in Unity Catalog. They set F1 as their evaluation metric and begin an AutoML experiment. After the AutoML experiment, they review the listed runs but are not convinced the selected model is the best-performing one that yields the best results based on the specified evaluation metric. What action will assist them in analyzing the results?
-
A
Review the best run notebook from the AutoML experiment to determine if further refinements can be made to improve the F1 score
-
B
Review the training dataset data types in Unity Catalog
-
C
Run the experiment again using AUC-ROC evaluations metrics and compare
-
D
Run the experiment again with a different ML problem type
Reveal answer details
Close answer details
Correct answerA
ExplanationThe best run notebook contains the generated training workflow for the AutoML model ranked by the chosen F1 metric. Reviewing that notebook exposes the model construction and preprocessing steps that can be refined to seek a better F1 score. Changing the problem type or evaluation metric would no longer analyze performance against the stated objective.
Question 23
Single choice
An environmental scientist is researching the relationship between various environmental factors and the viability of a specific invasive plant species. They have developed a linear regression model to measure growth rate in relation to temperature, humidity, air quality index, and other variables. The scientist now aims to assess the performance of the model, focusing particularly on its goodness of fit. They need to select a metric that will indicate the proportion of the variance in the growth rate that is predicted from the independent variables. Which metric will do this?
-
A
-
B
-
C
Mean Absolute Error (MAE)
-
D
Root Mean Squared Error (RMSE)
Reveal answer details
Close answer details
Correct answerA
ExplanationR-Squared, or R2, is a regression goodness-of-fit metric that represents the proportion of variance in the dependent variable explained by the model's independent variables. That directly matches the scientist's interest in explained growth-rate variation. MSE, MAE, and RMSE instead summarize prediction-error magnitude.
|