PROFESSIONAL-DATA-ENGINEER · Question #148
You are building a data pipeline on Google Cloud. You need to prepare data using a casual method for a machine-learning process. You want to support a logistic regression model. You also need to monit
The correct answer is B. Use Cloud Dataprep to find null values in sample source data. Convert all nulls to 0 using a Cloud Dataprep job.. Cloud Dataprep is the correct tool for casual data preparation; null values for logistic regression must be converted to numeric (real-valued) placeholders like 0, not strings.
Question
Options
- AUse Cloud Dataprep to find null values in sample source data. Convert all nulls to `none' using a Cloud Dataproc job.
- BUse Cloud Dataprep to find null values in sample source data. Convert all nulls to 0 using a Cloud Dataprep job.
- CUse Cloud Dataflow to find null values in sample source data. Convert all nulls to `none' using a Cloud Dataprep job.
- DUse Cloud Dataflow to find null values in sample source data. Convert all nulls to using a custom script.
How the community answered
(43 responses)- A7% (3)
- B74% (32)
- C16% (7)
- D2% (1)
Why each option
Cloud Dataprep is the correct tool for casual data preparation; null values for logistic regression must be converted to numeric (real-valued) placeholders like 0, not strings.
Converting null values to the string 'none' produces non-numeric categorical data that logistic regression cannot process directly, violating the constraint that values must remain real-valued.
Cloud Dataprep provides a visual interface for detecting null values in sample data and applying transformations across the full dataset; converting nulls to 0 preserves the real-valued numeric requirement of logistic regression input features while keeping the data pipeline within the managed Dataprep service.
Cloud Dataflow is a batch/stream data processing pipeline tool, not a casual data preparation tool; using Dataflow for null detection adds unnecessary engineering complexity compared to the visual Dataprep approach described.
Using Cloud Dataflow with a custom script for null handling is not the casual method described, introduces maintenance overhead, and the answer does not specify what value nulls are converted to, making it incomplete.
Concept tested: Null value preprocessing for ML models using Cloud Dataprep
Source: https://cloud.google.com/dataprep/docs/html/Help-Cloud-Dataprep
Topics
Community Discussion
No community discussion yet for this question.