Databricks Machine Learning Associate · Section 3 · 31% of the exam
Develop a training pipeline
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
In Spark ML a Transformer turns one DataFrame into another, while an Estimator is fit on a DataFrame and returns a Model, which is itself a Transformer. A Pipeline chains these stages; fitting it on training data only returns a PipelineModel that applies the same learned preprocessing and model to new data.
Points to remember
- Transformer:
transform(df)returns a new DataFrame, usually with appended columns. Estimator:fit(df)returns a Model, which is a Transformer. - Estimators:
StringIndexer,OneHotEncoder(Spark 3+),StandardScaler,Imputer, every learning algorithm, andPipelineitself. - Transformers:
VectorAssembler,Tokenizer,HashingTF,SQLTransformer, and every fitted Model, includingPipelineModel. Pipeline.fit()runs stages in order: estimators are fit and then transform, and transformers only transform. It returns aPipelineModel.- scikit-learn
fit()returns the fitted object itself; Spark MLfit()returns a new Model object.
In the course
The lesson Estimators, Transformers and Training Pipelines teaches this objective (about 40 minutes), and 13 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
- Use ML foundations to select the appropriate algorithm for a given model scenario
- Identify methods to mitigate data imbalance in training data
- Compare estimators and transformers
- 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