Databricks Certified Machine Learning Associate Practice Questions

Databricks Certified Machine Learning Associate exam preparation

Databricks Certified Machine Learning Associate practice questions in English: 170 questions with explanations. The mock exam has 48 questions and 90 minutes.

Databricks Certified Machine Learning Associate free question 8 / 10 · Domain 3: Model Development

A team wants to predict the number of days from the start of a subscription to cancellation. Subscriptions that have not been cancelled yet should enter training as cases where cancellation will happen after the number of days observed so far. Which Spark MLlib (spark.ml) regression is appropriate?

  1. LinearRegression with weightCol, lowering the weight of rows for subscriptions not yet cancelled
  2. IsotonicRegression, fitting a function that is monotonic in the length of the subscription
  3. AFTSurvivalRegression, marking the rows for subscriptions that have not been cancelled yet
  4. GeneralizedLinearRegression with family "poisson", treating the number of days as a count
Show the answer and explanation

Answer: C

Why this is correct
spark.ml implements the accelerated failure time (AFT) model, a parametric survival regression model for censored data. The training data carries a censor column besides label and features, which indicates whether the event has occurred (that is, whether the row is uncensored). This lets subscriptions that have not been cancelled enter the likelihood as events that happen after the observed number of days. The documentation adds that, unlike a proportional hazards model designed for the same purpose, an AFT model is easier to parallelize because each instance contributes to the objective function independently.

Why the other options are wrong
"IsotonicRegression, fitting a function that is monotonic in the length of the subscription" … Isotonic regression fits a monotonic function to observed values by least squares. Its input is label, features and weight, and it has no way to distinguish observations that were cut off before the event happened.
"GeneralizedLinearRegression with family "poisson", treating the number of days as a count" … A generalized linear model with a Poisson family treats the number of days as an observed count. A subscription that has not been cancelled would be learned as if it had been cancelled on that day.
"LinearRegression with weightCol, lowering the weight of rows for subscriptions not yet cancelled" … Lowering the weight still treats the observed days of an uncancelled subscription as the target value. The information that cancellation happens after those days never reaches the model, so the time to cancellation is underestimated.

Key point
The AFT model models the log of survival time, so it is often called a log-linear model for survival analysis, and the Weibull distribution for survival time is the most common choice. Feeding censored data into an ordinary regression mixes days of events that have not yet happened into the targets as if they were measured.

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

See the full practice set