Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Databricks Certified Machine Learning Associate · Databricks
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
- Correct answer : A — Tree-based models split on individual feature values, so encoding `category` with `OrdinalEncoder` instead often keeps the feature compact while the trees still learn useful splits. A . Because tree ensembles choose split thresholds on individual columns rather than forming a linear combination of features, an ordinal-encoded categorical column can still be split on effectively, avoiding the wide, sparse feature set that one-hot encoding a 40-level column would create. B . Some scikit-learn estimators and gradient-boosting implementations can accept categorical or ordinal-encoded inputs directly, so one-hot encoding every categorical column before every estimator is not a universal requirement. C . Gradient-boosted trees can consume encoded categorical features just fine, whether ordinal integers or one-hot columns, so dropping the column outright discards a feature the model could otherwise use. D . The two encodings are not interchangeable in effect: one-hot encoding gives the tree a separate binary split per category while ordinal encoding forces splits along a single learned numeric ordering, which can change which splits the model finds and how many are needed.