Databricks Certified Machine Learning Professional Practice Questions

Databricks Certified Machine Learning Professional exam preparation

Databricks Certified Machine Learning Professional practice questions in English: 180 questions with explanations. The mock exam has 59 questions and 120 minutes.

Databricks Certified Machine Learning Professional free question 1 / 10 · Domain 1: Model Development

A team keeps 2 TB of labeled click data in Delta tables and wants a logistic regression model that is retrained as the table grows. A teammate suggests collecting the data to the driver and fitting scikit-learn. According to the Databricks guidance on choosing between Spark and Ray, which approach fits the training step?

  1. Collect the table to the driver and fit scikit-learn on that single node.
  2. Use Ray tasks to split the model training into independent concurrent tasks.
  3. Write a UDF that fits a separate single-node model per row.
  4. Use SparkML, whose algorithms suit large-scale machine learning.
Show the answer and explanation

Answer: D

Why this is correct
The page contrasts the two engines: Spark excels at data parallelism, applying the same operation to each element of a large dataset, and its machine learning entry says that Spark's MLlib and SparkML libraries are optimized for large-scale machine learning algorithms and statistical modeling. A logistic regression over a multi-terabyte Delta table that must be refit as data grows is that case, so the training stays distributed on the cluster instead of moving to one machine.

Why the other options are wrong
"Collect the table to the driver and fit scikit-learn on that single node." … scikit-learn trains on one node, so the whole table would have to fit in driver memory, and extra workers do nothing for it. The page points to the MLlib and SparkML libraries for large-scale machine learning algorithms.
"Use Ray tasks to split the model training into independent concurrent tasks." … The page says Ray excels at task parallelism, running independent tasks concurrently, and suggests it for workloads where Spark is less optimized, such as reinforcement learning, simulation modeling, hyperparameter search and deep learning training. Fitting one model over a large table is data parallelism, which is where Spark excels.
"Write a UDF that fits a separate single-node model per row." … A per-row UDF sees one record per call, so it cannot learn one model from the whole dataset. The page recommends Spark for data parallelism and names MLlib and SparkML for large-scale machine learning.

Spark for data, Ray for tasks
Spark suits large-scale data processing and machine learning on large datasets. Ray suits independent concurrent tasks. One workflow can use both, for example Spark for data handling and Ray for computation.

Go to the Databricks Certified Machine Learning Professional practice app (10 free questions; purchase unlocks all questions)

See the full practice set