AWS Certified Machine Learning Specialty · Free Practice Question Medium

Question 3

The data science team at an analytics company is working on a credit score model using SageMaker Linear Learner algorithm. The training data consists of these fields : name, age, annual salary, gender, employment status and credit score. The model needs to predict the credit score label.

Which of the following data preparation steps need to be completed before working on the model?

  • A

    Drop the age and one-hot-encode name

  • B

    Drop the age and one-hot-encode name and credit score

  • C

    Drop the name and one-hot-encode gender and employment status

  • D

    Drop the name and one-hot-encode annual salary and credit score

Reveal correct answer

Correct answer: C

Explanation

Correct option:

Drop the name and one-hot-encode gender and employment status

One hot encoding is a process by which categorical variables are converted into a form that could be provided to ML algorithms to do a better job in prediction. A categorical variable can take on a limited, and usually fixed, number of possible values.

As gender and employment status are categorical they need to be one-hot-encoded. Name has no bearing as a useful feature for the model, so it can be discarded.

Incorrect options:

Drop the age and one-hot-encode name

Drop the age and one-hot-encode name and credit score

You cannot one-hot encode "name" as it's not a categorical variable, so both these options are incorrect.

Drop the name and one-hot-encode annual salary and credit score - You cannot one-hot encode annual salary as it's not a categorical variable.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need