Google Professional Machine Learning Engineer Question 116
Select 2Google Cloud PlatformYou are building a machine learning pipeline to predict customer churn. Your raw data resides in Google BigQuery, and it contains duplicate records, missing values, and inconsistent date formats. You also need to scale numerical features and encode categorical values. Which of the following tools or frameworks should you use to preprocess the data efficiently before training your model?
- A
Use Google Cloud Dataflow for cleaning the data and transforming it into a structured format.
- B
Use TensorFlow Extended (TFX) to perform data validation and feature engineering.
- C
Use Google BigQuery to export the data, then manually clean it in a local Python script.
- D
Use TensorFlow to directly load raw data and handle preprocessing during model training.
- E
Use Google BigQuery ML to preprocess the data automatically as part of the training process.
Show answer and explanation
Correct answers: A, B
Explanation
For preprocessing large datasets with complex requirements in the Google Cloud ecosystem, the combination of Dataflow and TFX is ideal. Dataflow is well-suited for cleaning and transforming large-scale data, while TFX provides tools for data validation and feature engineering. Together, they ensure efficient and scalable preprocessing workflows, enabling a robust machine learning pipeline.
- A. Correct.
Google Cloud Dataflow is a managed service for processing and transforming data at scale. It is suitable for tasks such as cleaning data, removing duplicates, and standardizing formats.
- B. Correct.
TensorFlow Extended (TFX) is designed to handle the end-to-end machine learning lifecycle, including data validation, preprocessing, and feature engineering. It is particularly suited for orchestrating preprocessing steps in machine learning pipelines.
- C. Incorrect.
Exporting data from BigQuery and cleaning it manually in a local Python script is inefficient and error-prone for large datasets. It does not leverage cloud-based preprocessing tools.
- D. Incorrect.
While TensorFlow can perform preprocessing during training, this approach is not efficient for large-scale preprocessing tasks or when the same preprocessing logic must be reused consistently across training and serving.
- E. Incorrect.
BigQuery ML is designed for building and training models directly in BigQuery but does not provide the flexibility or granularity required for complex preprocessing tasks like handling duplicates and inconsistent formats.