Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Databricks Certified Machine Learning Associate Exam Databricks-Machine-Learning-Associate Exam Questions

Last updated: · 10 practice questions with answers and explanations

Page: 1 / 8 Total 74 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Databricks Machine Learning

Skill tested: Select an appropriate Unity Catalog feature-table design for shared feature governance.

A company maintains customer features used by data scientists in several Databricks workspaces. The workspaces belong to the same Unity Catalog metastore, and the governance team needs centrally managed permissions and discoverability rather than separate feature definitions in each workspace. The team wants to create a governed Delta feature table and later use it for model training. Which approach best meets these requirements?

Correct Answer: D. Create a Unity Catalog feature table in a catalog and schema, and grant workspace users access through Unity Catalog privileges.
Explanation:

A Unity Catalog feature table is governed in the metastore and can be accessed from authorized workspaces, allowing centralized discovery and privilege management. Workspace-local feature tables do not provide the requested shared, centrally governed definition. The MLflow Model Registry tracks models, not feature-table governance, and a temporary view is session-scoped rather than a persistent shared feature asset.

Question 2

New Multiple answers

Topic: Databricks Machine Learning

Skill tested: Log MLflow run metrics and artifacts, then identify the best run using the client API.

A team runs several experiments under one MLflow experiment. Each run logs a validation metric named `val_auc`, and the preferred run is the one with the highest value. A report must also include the metric and a model artifact saved during that run. The team wants to find the winning run programmatically without assuming that the most recently created run is best. Which two actions meet the requirement? Select TWO.

Correct Answer: D. Read the selected run's metric from its `metrics` data and its artifact path from `artifact_uri` or the run's artifact listing.; E. Use `MlflowClient.search_runs` with a descending order on `metrics.val_auc` and select the first returned run.
Explanation:

Searching runs ordered by the logged validation metric directly implements the stated selection criterion; the search filter must target the intended experiment. A run record exposes logged metrics, while its artifact URI and artifact listing identify saved artifacts. Start time is not a quality measure, and model-registry latest-version operations concern registered model versions rather than ranking experiment runs. Run IDs also have no ordering semantics that identify model quality.

Question 3

New Single answer

Topic: Databricks Machine Learning

Skill tested: Register a trained model in the Unity Catalog model registry using MLflow.

A team has logged a trained model as an MLflow artifact and wants to promote it under a governed Unity Catalog model name, for example `prod.ml_models.churn_predictor`. The team needs model versions to be managed in Unity Catalog rather than the legacy workspace registry. The model artifact is available from a completed run, and the user has the required privileges on the target catalog and schema. What is the appropriate registration approach?

Correct Answer: A. Call `mlflow.register_model` with the run's model URI and the three-level Unity Catalog model name.
Explanation:

`mlflow.register_model` can register a logged model URI under a Unity Catalog three-level name, creating a governed registered model and version when permissions and the Unity Catalog registry setup are in place. Feature tables store features, not registered model artifacts. `get_latest_versions` retrieves versions from a registry; it does not migrate or register a model. A DataFrame artifact is not a substitute for registering a model with its MLflow model flavor and signature as appropriate.

Question 4

New Single answer

Topic: Databricks Machine Learning

Skill tested: Distinguish offline feature storage from online serving for low-latency inference.

An online fraud-scoring service must retrieve the latest customer risk features with low latency. The data science team also needs a durable historical store for training and audit queries. Features are currently maintained in a Delta feature table, but reading that table directly for every real-time request would not satisfy the endpoint's latency target. Which design is most appropriate?

Correct Answer: C. Use the Delta feature table as the offline source and publish the serving features to an online feature store for low-latency lookups.
Explanation:

Offline Delta feature tables support durable historical storage and training or analytical access, while an online feature store is designed for low-latency point lookups during real-time serving. Keeping the offline source preserves the historical use case; publishing the required features online addresses the serving constraint. Temporary views are not durable serving stores, online stores are not the preferred historical analytics system, and per-request batch Spark jobs do not meet low-latency synchronous inference needs.

Question 5

New Multiple answers

Topic: Databricks Machine Learning

Skill tested: Use AutoML to establish a baseline while retaining review of candidate models and features.

A small analytics team needs a strong initial classification baseline for a tabular dataset but has limited time to hand-build preprocessing and model code. They must retain control over which candidate is ultimately deployed, and they want reproducible experiment tracking. Which TWO statements best describe how Databricks AutoML can help? Select TWO.

Correct Answer: B. AutoML can generate notebook-based trial code that the team can inspect and adapt.; E. AutoML can run candidate trials and track their results in MLflow, helping the team compare models and configurations.
Explanation:

AutoML can automate baseline trial creation, record experiment results in MLflow, and provide generated notebook code that practitioners can inspect and modify. This supports rapid model development without removing human selection and review. It cannot guarantee global optimality or future generalization, and teams remain responsible for leakage checks, choosing metrics that reflect business objectives, and deployment suitability. AutoML does not itself replace access-control configuration.

Question 6

New Single answer

Topic: Databricks Machine Learning

Skill tested: Identify how ML runtimes improve compatibility and efficiency for machine learning workloads.

A data science group repeatedly installs and upgrades Spark ML and common machine-learning libraries on general-purpose clusters. This has caused environment drift between experimentation and scheduled training, and setup time is consuming a significant portion of each job. The group can use a Databricks Machine Learning runtime supported by its workspace. Which change most directly addresses both problems while preserving a reproducible cluster environment?

Correct Answer: B. Use a supported Databricks Machine Learning runtime for the relevant clusters and record the runtime version with the experiment.
Explanation:

Databricks Machine Learning runtimes provide a curated environment with commonly used machine-learning libraries and compatible components, reducing repeated setup and helping standardize cluster environments. Recording and consistently using a runtime version improves reproducibility. Unpinned packages and varying runtimes increase drift, while driver-local execution does not establish a consistent distributed cluster environment. MLflow metrics alone cannot reconcile changes in dependency behavior.

Question 7

New Single answer

Topic: ML Workflows

Skill tested: Choose and apply median imputation when continuous-feature distributions contain outliers.

A Spark DataFrame contains a continuous income feature with missing values. Exploration shows a strongly right-skewed distribution and a small number of unusually high but valid incomes. The modeling pipeline requires a simple single-value imputation that is robust to those extremes. Which approach is most appropriate?

Correct Answer: B. Impute missing incomes with the median calculated from the training data.
Explanation:

The median is less sensitive than the mean to extreme values, so it is a reasonable single-value imputation for a skewed continuous feature with valid outliers. Calculate the statistic using training data only, then apply that learned value to validation and test data to avoid leakage. The mean can be pulled upward by the high incomes; the mode may be unrepresentative or poorly defined for continuous data; zero would introduce a potentially artificial value.

Question 8

New Multiple answers

Topic: ML Workflows

Skill tested: Apply IQR-based outlier filtering to a Spark DataFrame using training-derived thresholds.

A team is preparing a continuous measurement feature for a model. Subject-matter experts confirm that extreme sensor readings are data errors, not rare valid events. The team wants to remove rows outside an IQR-based range and avoid using validation or test information to determine the filtering thresholds. Which TWO steps are appropriate? Select TWO.

Correct Answer: B. Set the lower and upper limits to Q1 minus 1.5 times the IQR and Q3 plus 1.5 times the IQR, respectively.; C. Compute the first and third quartiles from the training split, then calculate the IQR as Q3 minus Q1.
Explanation:

The conventional IQR rule derives Q1, Q3, and IQR from the training data, then flags values below Q1 - 1.5×IQR or above Q3 + 1.5×IQR. Deriving thresholds only from training data avoids allowing validation or test distributions to influence preprocessing. Computing thresholds across all splits introduces leakage. Removing all values above the mean is not an IQR rule, and replacing extremes with the maximum does not remove the identified erroneous rows.

Question 9

New Single answer

Topic: Model Development

Skill tested: Select a classification metric that balances precision and recall for imbalanced data.

A bank is evaluating a fraud classifier on a dataset where fraudulent transactions are rare. Missing fraud is costly, but excessive false alarms also overwhelm investigators. The operating team has not chosen a fixed probability threshold yet, and the evaluation should emphasize a useful balance between precision and recall rather than raw accuracy. Which metric is the best primary metric for comparing candidate classifiers?

Correct Answer: D. F1 score, because it summarizes the balance between precision and recall at a selected threshold.
Explanation:

F1 is the harmonic mean of precision and recall, making it more informative than accuracy when the positive class is rare and both missed fraud and false alarms matter. It is threshold-dependent, so the team should choose and validate an operating threshold against business costs after comparing models. Accuracy can appear high by predicting the majority class. R-squared and MAE are regression metrics and do not assess binary classification performance.

Question 10

New Single answer

Topic: Model Development

Skill tested: Count model fits produced by parameter combinations and cross-validation folds.

An engineer tunes a Spark ML pipeline with a parameter grid containing three values for one parameter and four values for another. The engineer uses three-fold cross-validation and does not enable early termination. Each parameter combination is evaluated independently in each fold. How many model fits does the cross-validation stage perform?

Correct Answer: A. 36
Explanation:

The grid contains 3 × 4 = 12 parameter combinations. Three-fold cross-validation fits each combination once per fold, so the cross-validation stage performs 12 × 3 = 36 model fits. The count of 12 ignores the folds, and 7 adds the parameter-value counts rather than forming their Cartesian product. A final refit on the full training set may occur depending on the tuning workflow, but it is not part of the stated cross-validation-stage count.