AWS Certified Machine Learning Engineer – Associate (MLA-C01) — Question 26

A company wants to predict the success of advertising campaigns by considering the color scheme of each advertisement. An ML engineer is preparing data for a neural network model. The dataset includes color information as categorical data.
Which technique for feature engineering should the ML engineer use for the model?

Answer options

Correct answer: D

Explanation

The correct answer is D because one-hot encoding effectively converts categorical color data into a format that can be easily processed by the neural network, creating binary columns for each color. Option A, label encoding, may introduce unintended ordinal relationships among colors, while options B and C are not appropriate for handling categorical data.