Databricks Machine Learning Associate exam dumps

Databricks Machine Learning Associate practice question 198 of 656

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

Databricks Machine Learning Associate Question 198

Single answer

Why is one-hot encoding categorical features often inefficient when used with tree-based models in machine learning?

  1. A

    One-hot encoding increases the dimensionality of the data, making tree splits computationally expensive.

  2. B

    Tree-based models cannot handle categorical data unless it is one-hot encoded.

  3. C

    One-hot encoding introduces sparsity in the data, which is not ideal for tree-based models.

  4. D

    Tree-based models are inherently unable to handle high-cardinality categorical features.

Show answer and explanation

Correct answer: A

Explanation

One-hot encoding is often inefficient for tree-based models because it increases the dimensionality of the dataset, especially for categorical features with many unique values. This increase in the number of features makes the process of constructing decision trees more computationally expensive. Additionally, tree-based models can usually handle categorical features without one-hot encoding, making this preprocessing step unnecessary in many cases.

  • A. Correct.

    Correct. One-hot encoding increases the number of features in the dataset, especially for high-cardinality categorical features. This can make the process of finding optimal splits for decision trees more computationally expensive and can lead to inefficiencies.

  • B. Incorrect.

    Incorrect. Tree-based models can often handle categorical data without requiring one-hot encoding (e.g., decision trees can split data based on categorical values directly).

  • C. Incorrect.

    Incorrect. While one-hot encoding does introduce sparsity, tree-based models are generally robust to sparsity and can still operate effectively with sparse data.

  • D. Incorrect.

    Incorrect. Tree-based models can handle high-cardinality features without one-hot encoding by using other encoding methods or directly splitting on categorical values.

Timed practice exam

Take a Databricks Machine Learning Associate practice test under exam conditions

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

Start timed exam