MLS-C01 exam dumps

MLS-C01 practice question 96 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 96

Select 2

You are building a machine learning model to predict customer churn for a subscription-based business. Your dataset includes features such as 'Total Monthly Charges,' 'Customer Tenure in Months,' and 'Contract Type.' The feature 'Contract Type' is categorical with values 'Month-to-Month,' 'One Year,' and 'Two Year.' Which of the following feature engineering techniques should you use to prepare the 'Contract Type' feature for a machine learning model?

  1. A

    One-hot encoding

  2. B

    Label encoding

  3. C

    Scaling using Min-Max normalization

  4. D

    Imputation using the mean value

  5. E

    Binarization based on a threshold

Show answer and explanation

Correct answers: A, B

Explanation

Categorical variables like 'Contract Type' need to be transformed into numerical representations before they can be used in machine learning models. Both one-hot encoding and label encoding are valid techniques for this. One-hot encoding is generally preferred when there is no ordinal relationship between categories, while label encoding can be useful for models that can interpret ordinal or categorical indices. The other options are unsuitable for preparing categorical variables.

  • A. Correct.

    One-hot encoding is a valid technique for categorical variables, especially when the categories do not have an ordinal relationship. It creates binary columns for each category, making it suitable for machine learning models.

  • B. Correct.

    Label encoding is another valid technique for categorical variables. It assigns a unique integer to each category, which can be useful for certain models that can interpret ordinal relationships or categorical indices.

  • C. Incorrect.

    Scaling using Min-Max normalization is not applicable here because 'Contract Type' is a categorical variable and scaling is typically used for numerical features.

  • D. Incorrect.

    Imputation using the mean value is irrelevant in this scenario, as there are no missing values mentioned for the 'Contract Type' feature.

  • E. Incorrect.

    Binarization based on a threshold is not appropriate because 'Contract Type' is not a numerical feature and does not have a threshold-based decision boundary.

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