MLS-C01 exam dumps

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

Select 3

A data science team is working on a machine learning model for predicting house prices. The dataset contains features such as 'square_footage', 'number_of_bedrooms', 'year_built', and 'zipcode'. The team observes that 'zipcode' has a high cardinality and is not directly interpretable for the model. Which feature engineering techniques can be applied to address this issue?

  1. A

    Perform one-hot encoding on the 'zipcode' feature.

  2. B

    Apply min-max scaling to the 'zipcode' feature.

  3. C

    Group 'zipcode' into broader categories based on geographic regions.

  4. D

    Use target encoding to replace 'zipcode' with the mean house price for each zip code.

  5. E

    Remove the 'zipcode' feature entirely to simplify the model.

Show answer and explanation

Correct answers: A, C, D

Explanation

High-cardinality categorical features like 'zipcode' can pose challenges in machine learning models. Techniques such as one-hot encoding (if cardinality is manageable), grouping into broader categories, or target encoding are effective ways to address this issue. Removing the feature should only be considered if it has no predictive value, which is not indicated in this scenario.

  • A. Correct.

    One-hot encoding is a common technique for handling categorical features with low to moderate cardinality, making it a suitable option for 'zipcode' if the cardinality is manageable.

  • B. Incorrect.

    Min-max scaling is primarily used for numerical features to normalize their range. Since 'zipcode' is a categorical feature, this technique is not applicable.

  • C. Correct.

    Grouping 'zipcode' into broader geographic categories reduces cardinality and can help the model capture regional trends, making it a valid feature engineering approach.

  • D. Correct.

    Target encoding replaces categorical values with the mean target value for each category, which can be effective but requires caution to avoid data leakage.

  • E. Incorrect.

    Removing the 'zipcode' feature simplifies the model but is not ideal unless the feature is found to be irrelevant to the prediction task.

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