Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Google Cloud Certified Professional Machine Learning Engineer · Google Cloud
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
having extra feature of missing flag is good, and hence D. B is close but as this new feature is not added there, it loses out here
It should be B. Missing categorical values can be imputed with the most frequent (mode) value in the column. https://docs.cloud.google.com/vertex-ai/generative-ai/docs/prompt-gallery/samples/code_learn_about_dataset_transformations
Preserving the Signal: By adding a new category (e.g., "Unknown" or "Missing"), you allow the model to learn a specific weight for when that feature is unavailable. Indicator Variable: Creating a secondary binary feature (0 for present, 1 for missing) explicitly tells the model to pay attention to the absence of data. This "indicator" helps the model distinguish between a genuine value and a placeholder. Handling Categorical Data: Since Feature A is categorical, you cannot use mathematical averages. Simply assigning it a new class name is the cleanest way to keep all your data rows without losing the predictive power of the samples that do have the feature.