Question 24
Domain 2: Data ProcessingA data scientist is preparing a dataset that includes a nominal feature with categories such as red, blue, and green. For which type of model is one-hot encoding generally the most appropriate choice?
Correct answer: A
Explanation
One-hot encoding is generally appropriate for nominal categorical variables when the model should not infer any numeric order between categories. It is less appropriate when the encoding would impose unnecessary dimensionality or when the model/data representation handles categories differently. — official.txt
Why each option is right or wrong
A. A model that needs categorical values represented without implying any ranking between categories
One-hot encoding fits this scenario because the feature values are nominal categories, and the method represents each category separately without introducing a false numeric order into the model input.
B. A model that performs best when every category is converted into a single ordered numeric scale
One-hot encoding does not place categories on a single ordered numeric scale.
C. A dataset where preserving the natural sequence of category values is the primary requirement
One-hot encoding removes sequence information rather than preserving it.
D. A dataset where reducing the number of input columns is the primary goal for categorical features
One-hot encoding typically increases the number of input columns by creating one indicator per category.