MLA-C01 exam dumps

MLA-C01 practice question 62 of 458

AWS Certified Machine Learning Engineer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

MLA-C01 Question 62

Single answer

You are building a machine learning model to predict customer churn for a subscription service. Your dataset includes a categorical feature called 'Subscription Type' with three possible values: 'Basic', 'Premium', and 'Enterprise'. The model you are using is a tree-based algorithm that does not require feature scaling. Which encoding technique is the most appropriate to use for this feature?

  1. A

    Label Encoding

  2. B

    One-Hot Encoding

  3. C

    Binary Encoding

  4. D

    Tokenization

Show answer and explanation

Correct answer: B

Explanation

Tree-based algorithms, such as Random Forest or XGBoost, do not require feature scaling and can handle categorical data well. However, using Label Encoding could introduce unintended ordinal relationships between the categories. One-Hot Encoding is the most appropriate choice because it avoids ordinal relationships and creates binary columns for each category, ensuring that the tree-based model can process the data effectively.

  • A. Incorrect.

    Label Encoding assigns a unique integer to each category (e.g., Basic=0, Premium=1, Enterprise=2). However, this can introduce unintended ordinal relationships, which tree-based models generally do not handle correctly.

  • B. Correct.

    One-Hot Encoding creates a separate binary column for each category without introducing ordinal relationships. This is the most appropriate technique for tree-based models when dealing with categorical features.

  • C. Incorrect.

    Binary Encoding converts categories into binary digits, which reduces dimensionality compared to One-Hot Encoding. However, it may still introduce slight ordinal relationships, making it less ideal for this scenario.

  • D. Incorrect.

    Tokenization is used to process text data by splitting it into tokens (e.g., words or subwords). It is not suitable for encoding categorical variables like 'Subscription Type'.

Timed practice exam

Take a MLA-C01 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam