You need casual data preparation for a logistic regression model and must keep nulls as real-valued (not removed). What approach should you use?
Choose an answer
Tap an option to check your answer.
Correct answer: Use Cloud Dataprep to detect nulls and convert all nulls to 0 with Dataprep..
Why this is the answer
The correct approach is to use Cloud Dataprep to detect nulls and convert them to 0. Cloud Dataprep is a suitable tool for casual data preparation tasks, offering a visual interface to identify and transform data, including handling null values. For a logistic regression model, numerical input is generally preferred. Converting nulls to 0 allows the model to treat these missing values as a specific numerical category, fulfilling the requirement to keep them as real-valued rather than removing them. Converting nulls to the string 'none' is incorrect because logistic regression models typically require numerical input, and a string value would not be directly usable without further encoding. Using Cloud Dataflow is an option for more complex or large-scale data transformations, but for "casual data preparation," Dataprep is more appropriate and efficient. While Dataflow with a custom script could convert nulls to 0, Dataprep offers a simpler, no-code solution for this specific task.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed