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

A company’s ML engineer is creating a classification model. The ML engineer explores the dataset and notices a column that is named day_of_week. The column’s data consists of the following values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

Which technique should the ML engineer use to convert this column’s data to binary values?

Answer options

Correct answer: C

Explanation

One-hot encoding is the correct technique to convert categorical data like days of the week into binary format, as it creates a separate binary column for each category. In contrast, binary encoding and label encoding do not create distinct columns for each category, which can lead to misinterpretation of the data. Tokenization is not relevant for this scenario as it pertains to breaking down text data.