MLA-C01 exam dumps

MLA-C01 practice question 64 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 64

Select 2

You are building a machine learning model to predict customer churn. Your dataset contains a categorical feature called 'Customer_Type' with the following unique values: 'New', 'Returning', and 'VIP'. The model you are using is a tree-based algorithm (e.g., XGBoost). Which encoding technique(s) would be most appropriate for this feature?

  1. A

    One-hot encoding

  2. B

    Label encoding

  3. C

    Binary encoding

  4. D

    Tokenization

Show answer and explanation

Correct answers: A, B

Explanation

Tree-based algorithms, such as XGBoost, can handle both one-hot encoding and label encoding effectively. One-hot encoding is commonly used for small sets of categorical values as it creates interpretable binary columns. Label encoding is also appropriate for tree-based models because the algorithm does not assume an ordinal relationship between encoded values. Binary encoding and tokenization are not suited for this specific scenario.

  • A. Correct.

    One-hot encoding is appropriate for tree-based algorithms as it creates separate binary columns for each category, allowing the model to effectively split on these features.

  • B. Correct.

    Label encoding is also appropriate for tree-based algorithms since the algorithm uses the order of the labels only to split data and does not assume a numerical relationship between the values.

  • C. Incorrect.

    Binary encoding is generally used for high-cardinality categorical features (features with a large number of unique values) to reduce dimensionality, which is not necessary in this case with only three categories.

  • D. Incorrect.

    Tokenization is used for text-based features, not for encoding categorical features, and is irrelevant in this scenario.

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