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
GBTClassifiersupports 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.mlfor 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?
- A
RandomForestClassifier, trained on a label column filled with randomly assigned group numbers - B
KMeans, after scaling the features so that no single feature dominates the distances - C
LinearRegression, predicting each customer's total spend for the next quarter - D
ALS, 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
- Identify methods to mitigate data imbalance in training data
- Compare estimators and transformers
- Develop a training pipeline
- Use Hyperopt's fmin operation to tune a model's hyperparameters
- Perform random or grid search or Bayesian search as a method for tuning hyperparameters.
- Parallelize single node models for hyperparameter tuning
- Describe the benefits and downsides of using cross-validation over a train-validation split.
- Perform cross-validation as a part of model fitting.
- Identify the number of models being trained in conjunction with a grid-search and cross-validation process.
- Use common classification metrics: F1, Log Loss, ROC/AUC, etc
- Use common regression metrics: RMSE, MAE, R-squared, etc.
- Choose the most appropriate metric for a given scenario objective