You are building a regression model to predict rental rates. A categorical feature Wall_Color indicates the property's dominant exterior color. Which feature-engineering methods will allow this model to use the Wall_Color data? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Add binary one-hot encoded columns for each color category., Replace each color label with its frequency count from the training set..
Why this is the answer
One-hot encoding creates a new binary column for each unique category, with a 1 indicating the presence of that category and 0 otherwise. This allows the model to treat each color as an independent feature without implying any ordinal relationship. Replacing each color label with its frequency count from the training set (frequency encoding) can also be effective. This method replaces the categorical label with the number of times it appears in the dataset, which can capture information about the prevalence of certain colors and potentially correlate with rental rates. Mapping colors to arbitrary integers imposes an artificial ordinal relationship that doesn't exist, which can mislead the model. Replacing color names with their length is unlikely to capture any meaningful information relevant to rental rates. Encoding colors as RGB values is generally used for image processing, not for discrete categorical features like wall color in a regression model, and would introduce unnecessary complexity.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed