
DatabricksCertified Machine Learning Associate
Domain 2Objective 7
Use One-Hot Encoding for Categorical Features MACHINE-LEARNING-ASSOCIATE Practice Questions (Page 2)
Part of the Section 2: Data Processing domain, which makes up ~27% of our current practice bank. Databricks does not publish an official question count, but from its 90-minute exam (~35–60 total, ~9–16 in this domain), expect 1–2 from this objective — we provide 23 practice questions to prepare you well beyond it. (estimate)
23questions here
5free pages
5concepts
Questions 6–10
- 6
A machine learning engineer is deploying a Spark ML pipeline for real-time inference. The training data had a categorical column 'device_type' with values 'mobile', 'tablet', 'desktop'. During inference, a new device type 'smartwatch' appears. The pipeline currently uses StringIndexer with default settings. What will happen when the pipeline processes the new value?
Select an answer first - 7
A data analyst is explaining one-hot encoding to a colleague. They have a categorical feature 'day_of_week' with values 'Mon', 'Tue', 'Wed', 'Thu', 'Fri'. Which statement accurately describes one-hot encoding for this feature?
Select an answer first - 8
A machine learning engineer is preparing a dataset with a 'color' column containing values 'red', 'green', 'blue'. They plan to use one-hot encoding. During model inference, they encounter a new value 'yellow' that was not present in the training data. What is the most appropriate way to handle this unseen category?
Select an answer first - 9
A data scientist is comparing one-hot encoding with label encoding for a categorical feature 'city' with 50 categories in a linear regression model. What is the primary advantage of one-hot encoding over label encoding in this context?
Select an answer first - 10
A data scientist is building a Spark ML pipeline to predict employee attrition. The dataset has a categorical column 'job_role' with 15 unique values. They want to one-hot encode this column. What is the correct way to prepare this column for one-hot encoding?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Databricks. “MACHINE-LEARNING-ASSOCIATE” is a trademark of its owner, used for identification only.