Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 68 of 280

Databricks Certified Machine Learning Professional. Professional level, Databricks. Free question with the correct answer and a full explanation.

Databricks Machine Learning Professional Question 68

Select 3

A machine learning engineer is building a custom model class for a regression task in Databricks. They decide to include preprocessing logic such as feature scaling and encoding directly within the class. What are the benefits of incorporating preprocessing logic and context into custom model classes?

  1. A

    It ensures that preprocessing steps are consistently applied during both training and inference.

  2. B

    It allows the model to automatically adapt to any feature changes in the dataset during inference without retraining.

  3. C

    It improves code modularity by encapsulating preprocessing and model logic in a single object.

  4. D

    It reduces the risk of data leakage by ensuring that preprocessing is applied only on the training data during training.

  5. E

    It simplifies model deployment pipelines by bundling preprocessing and model logic together.

Show answer and explanation

Correct answers: A, C, E

Explanation

Including preprocessing logic and context in custom model classes ensures consistent application of preprocessing during training and inference, improves code modularity, and simplifies deployment pipelines. However, it does not automatically handle feature changes or inherently prevent data leakage without careful implementation.

  • A. Correct.

    Correct: Including preprocessing logic in the model class ensures that the same preprocessing steps are applied consistently during both training and inference, reducing discrepancies.

  • B. Incorrect.

    Incorrect: The model cannot automatically adapt to feature changes in the dataset without retraining. Feature changes require explicit retraining to capture new patterns.

  • C. Correct.

    Correct: Combining preprocessing and model logic in a single class improves modularity and code maintainability, making it easier to manage the pipeline.

  • D. Incorrect.

    Incorrect: While preprocessing can be encapsulated, avoiding data leakage depends on how the preprocessing logic is implemented (e.g., using training-only data stats for scaling). This is not inherently solved by including preprocessing in the model class.

  • E. Correct.

    Correct: By bundling preprocessing and model logic together, deployment is simplified as users do not need to separately apply preprocessing steps before inference.

Timed practice exam

Take a Databricks Machine Learning Professional practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam