MLS-C01 exam dumps

MLS-C01 practice question 94 of 389

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

MLS-C01 Question 94

Select 2

You are building a machine learning model to predict customer churn for a subscription-based service. The dataset contains features such as 'Age', 'Tenure', 'Monthly Charges', and 'Contract Type'. You notice that the 'Contract Type' feature is categorical with three possible values: 'Month-to-Month', 'One-Year', and 'Two-Year'. Which of the following feature engineering techniques should you apply to prepare the 'Contract Type' feature for a machine learning model?

  1. A

    Apply one-hot encoding to the 'Contract Type' feature.

  2. B

    Normalize the 'Contract Type' feature to scale values between 0 and 1.

  3. C

    Perform label encoding on the 'Contract Type' feature.

  4. D

    Remove the 'Contract Type' feature since it is categorical.

  5. E

    Group 'One-Year' and 'Two-Year' into a single category to reduce dimensionality.

Show answer and explanation

Correct answers: A, C

Explanation

To prepare a categorical feature like 'Contract Type' for a machine learning model, you can either use one-hot encoding (to avoid implying an ordinal relationship) or label encoding (to assign unique integer values to categories). These techniques ensure the categorical data is appropriately represented in a numerical format for the model. Normalization, feature removal, or arbitrary grouping are not suitable for this use case.

  • A. Correct.

    Correct: One-hot encoding is a common technique to handle categorical data by creating binary columns for each category, which avoids introducing ordinal relationships.

  • B. Incorrect.

    Incorrect: Normalization is typically applied to numerical features, not categorical features like 'Contract Type'.

  • C. Correct.

    Correct: Label encoding can be used to convert categorical labels into numerical values, which is useful for certain types of machine learning models.

  • D. Incorrect.

    Incorrect: Removing the 'Contract Type' feature would result in losing potentially important information, which is not ideal unless there is evidence it lacks predictive power.

  • E. Incorrect.

    Incorrect: Grouping categories without domain knowledge or justification might lead to a loss of important distinctions between categories.

Timed practice exam

Take a MLS-C01 practice test under exam conditions

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

Start timed exam