Google Professional Machine Learning Engineer Question 72
Select 3Google Cloud PlatformYou are working on a project to build a custom machine learning model using a dataset that contains tabular data representing customer transactions. The dataset has numerical, categorical, and missing values. What should you do to prepare the data for training a machine learning model in Google Cloud?
- A
Normalize the numerical features to ensure they are on the same scale.
- B
Encode the categorical features using techniques like one-hot encoding or embedding.
- C
Remove all rows with missing values to avoid errors during training.
- D
Use tools like Google Cloud Dataflow or Vertex AI Workbench to preprocess the data.
- E
Combine numerical and categorical features into a single feature using concatenation before training.
Show answer and explanation
Correct answers: A, B, D
Explanation
Preparing data for machine learning involves several important preprocessing steps. Numerical features should be normalized to ensure they are on the same scale. Categorical features must be encoded so that they can be interpreted by the model. Using Google Cloud tools like Dataflow or Vertex AI Workbench can streamline the preprocessing pipeline. However, removing all missing values is not recommended as it could lead to significant data loss, and arbitrarily combining different feature types is not a standard or effective approach.
- A. Correct.
Normalizing numerical features ensures that all features are on the same scale, which can improve the performance and convergence of machine learning models.
- B. Correct.
Encoding categorical features is necessary so that machine learning models can interpret them. Techniques such as one-hot encoding or embeddings are commonly used.
- C. Incorrect.
Removing all rows with missing values is not ideal because it can lead to significant data loss. Instead, techniques like imputation can be used to handle missing values.
- D. Correct.
Google Cloud Dataflow and Vertex AI Workbench are powerful tools for preprocessing data at scale, including handling missing values, normalizing, and encoding features.
- E. Incorrect.
Combining numerical and categorical features into a single feature before training is not a standard practice. Instead, they should be processed separately and appropriately before being fed into the model.