Google Professional Machine Learning Engineer Question 71
Select 3Google Cloud PlatformYou are building a machine learning model on Google Cloud to classify customer reviews into positive, neutral, or negative sentiments. The dataset consists of a large collection of text reviews. Which of the following steps should you take to prepare the data for training your custom model?
- A
Tokenize the text data and convert it into numerical representations such as word embeddings.
- B
Use Data Loss Prevention (DLP) API to remove personally identifiable information (PII) from the text data.
- C
Manually label each review as positive, neutral, or negative to ensure the dataset is fully labeled.
- D
Normalize the text data by converting it to lowercase and removing stopwords, punctuation, and special characters.
- E
Convert the text data into tabular format by counting the number of words in each review.
Show answer and explanation
Correct answers: A, B, D
Explanation
Preparing text data for a machine learning model involves tokenization, numerical representation, normalization, and ensuring data privacy. Tokenization and word embeddings make the text understandable for the model, while normalization ensures consistency in the data. Using the DLP API protects sensitive information in customer reviews. However, simply counting words (option 5) is insufficient for sentiment analysis, and manual labeling (option 3) is unnecessary if the dataset is already labeled.
- A. Correct.
Tokenizing the text and converting it into numerical representations, such as word embeddings, is a standard step in preparing text data for machine learning models. It ensures the model can process the text data effectively.
- B. Correct.
Using the DLP API to remove PII is a best practice when working with customer data. This ensures compliance with data privacy regulations and reduces the risk of exposing sensitive information.
- C. Incorrect.
Manually labeling the dataset is important if the data lacks labels, but this step is unnecessary if the dataset is already labeled. The question does not specify that the dataset is unlabeled.
- D. Correct.
Normalizing the text data by converting it to lowercase and removing stopwords, punctuation, and special characters is a critical preprocessing step to make the text uniform and simplify analysis.
- E. Incorrect.
Converting text data into a tabular format by counting words does not provide sufficient semantic information for a model to classify sentiment. More advanced representations, like embeddings, are necessary.