CertLumen

Databricks Machine Learning Associate · Section 3 · 31% of the exam

Use ML foundations to select the appropriate algorithm for a given model scenario

One of the objectives of the Databricks Certified Machine Learning Associate exam, in the section “Model Development”. Here is what it covers, the points to remember and a question to try.

What it covers

Pick an algorithm by framing the problem first (label type, data size, interpretability, non-linearity), then check the class balance. When one class is rare, mitigate it in the training data with class weights, resampling or threshold tuning, and judge the result with metrics that notice the minority class.

Points to remember

  • Frame first: continuous label means regression, categorical label means classification, no label means clustering or anomaly detection, interactions mean recommendation (ALS).
  • Linear and logistic models are interpretable baselines; tree ensembles capture non-linearity; random forests reduce variance, boosting reduces bias.
  • Spark ML GBTClassifier supports binary labels only; use random forest, decision tree, multinomial logistic regression or Naive Bayes for multiclass.
  • Trees need no scaling or one-hot encoding; linear models and k-means are sensitive to feature scale.
  • Use single-node libraries when data fits on one machine; use pyspark.ml for distributed training (serverless limit: 100 MB per model).

Try a question

A marketing team wants to split 2 million loyalty members into groups with similar spending and visit patterns, so that each group can get its own campaign. The Unity Catalog table has numeric behavior features but no column that says which group a customer belongs to. Which Spark ML estimator fits this problem?

  1. ARandomForestClassifier, trained on a label column filled with randomly assigned group numbers
  2. BKMeans, after scaling the features so that no single feature dominates the distances
  3. CLinearRegression, predicting each customer's total spend for the next quarter
  4. DALS, factorizing the customer-by-feature matrix into latent segments
Show the answer

B. With no label, the task is unsupervised: clustering finds groups of similar rows. Spark ML offers KMeans, BisectingKMeans and GaussianMixture for this. k-means assigns rows by distance to cluster centers, so scale the features first, and choose the number of clusters k yourself.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson Choosing an Algorithm and Handling Imbalanced Classes teaches this objective (about 40 minutes), and 16 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 48 objectives · Next objective →