Google Professional Machine Learning Engineer Question 212
Select 3Google Cloud PlatformYou are building a machine learning model on Google Cloud to predict customer churn for a subscription-based service. The dataset contains categorical features such as 'Subscription Type' and numerical features such as 'Monthly Spend'. During model development, which considerations should you prioritize to ensure the model's performance and reliability?
- A
Handle categorical features appropriately, such as using one-hot encoding or embeddings.
- B
Normalize numerical features to ensure they are on the same scale.
- C
Use the entire dataset for training to maximize the amount of data available to the model.
- D
Check for class imbalance in the target variable and apply techniques like oversampling or class weighting if needed.
- E
Ignore missing values, as modern machine learning models can typically handle them automatically.
Show answer and explanation
Correct answers: A, B, D
Explanation
When building machine learning models, it is important to preprocess the data properly to ensure the model's performance and reliability. Handling categorical features, normalizing numerical features, and addressing class imbalance are critical steps. Ignoring missing values or using the entire dataset for training without reserving a validation set can lead to poor generalization or suboptimal model performance.
- A. Correct.
Correct: Proper handling of categorical features, such as using one-hot encoding or embeddings, is crucial for the model to interpret these features correctly.
- B. Correct.
Correct: Normalizing numerical features ensures they are on the same scale, which is especially important for models sensitive to feature ranges, such as neural networks.
- C. Incorrect.
Incorrect: Reserving a portion of the dataset for evaluation or validation is essential to prevent overfitting and to assess the model's generalization capability.
- D. Correct.
Correct: Addressing class imbalance in the target variable improves the model's ability to predict minority classes and avoids bias towards majority classes.
- E. Incorrect.
Incorrect: Missing values should not be ignored, as they can negatively impact model performance. Techniques like imputation should be applied to handle them appropriately.