ExamQuestions.com

Register
Login
AWS Certified Machine Learning Specialty Exam Questions

Amazon

AWS Certified Machine Learning Specialty

230 / 258

Question 230:

You are a machine learning consultant who has been contracted to evaluate and correct a model built by a client’s machine learning team. The team’s model performs poorly against their selected metric when the team tries to fit the model. The model is built using scikit-learn and uses the RandomForest algorithm. After doing some investigation you see that the data source has missing values in both numeric and categorical features and the machine learning team chose the strategy of dropping the features with missing data. You want to use the scikit-learn ColumnTransformer class to transform the missing data, specifically replacing the missing data in the numeric and categorical data features using imputation. You have decided to replace the numeric missing values with predictions for the missing values, and the categorical missing values with the most frequent value in the feature. Which of the following are the best approaches to achieving your goal? (Select TWO)

Answer options:

A.Create a one-step preprocessing transformer for the numerical missing values that uses a SimpleImputer using an ExtraTreesRegressor estimator
B.Create a one-step preprocessing transformer for the numerical missing values thatuses a SimpleImputer using the constant strategy
C.Create a two-step preprocessing transformer for the categorical missing values that uses a SimpleImputer using the most_frequent strategy then uses the OneHotEncoder in step two to encode the categorical data
D.Create a two-step preprocessing transformer for the categorical missing values that uses an IterativeImputer using the most_frequent strategy then uses the OneHotEncoder in step two to encode the categorical data
E.Create a one-step preprocessing transformer for the numerical missing values thatuses a KNNImputer