QuestionQ4

VerifiedData Preparation for Machine Learning (ML)

An ML engineer is developing a logistic regression model to predict customer churn for subscription services. The ML engineer is using a dataset that includes two string variables: location and job_seniority_level. The location variable has 3 distinct values, while the job_seniority_level variable has more than 10 distinct values.

The ML engineer must preprocess these variables.

Which solution meets this requirement?

Explanation

One-hot encoding is appropriate for location because its categories are nominal and should not be assigned an artificial order. Ordinal encoding is appropriate for job_seniority_level because seniority levels have an inherent order. Categorical string values must be converted to numeric representations for use as logistic-regression features; standard scaling and binning are not categorical encoders.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!