Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Databricks Machine Learning Associate Exam - Topic 1 Question 48 Discussion

Posted by Loren on Aug 12, 2026 at 11:32 PM

A data scientist has replaced missing values in their feature set with each respective feature variable's median value. A colleague suggests that the data scientist is throwing away valuable information by doing this.

Which of the following approaches can they take to include as much information as possible in the feature set?

Suggested Answer: D

By creating a binary feature variable for each feature with missing values to indicate whether a value has been imputed, the data scientist can preserve information about the original state of the data. This approach maintains the integrity of the dataset by marking which values are original and which are synthetic (imputed). Here are the steps to implement this approach:

Identify Missing Values: Determine which features contain missing values.

Impute Missing Values: Continue with median imputation or choose another method (mean, mode, regression, etc.) to fill missing values.

Create Indicator Variables: For each feature that had missing values, add a new binary feature. This feature should be '1' if the original value was missing and imputed, and '0' otherwise.

Data Integration: Integrate these new binary features into the existing dataset. This maintains a record of where data imputation occurred, allowing models to potentially weight these observations differently.

Model Adjustment: Adjust machine learning models to account for these new features, which might involve considering interactions between these binary indicators and other features.

Reference

'Feature Engineering for Machine Learning' by Alice Zheng and Amanda Casari (O'Reilly Media, 2018), especially the sections on handling missing data.

Scikit-learn documentation on imputing missing values: https://scikit-learn.org/stable/modules/impute.html


Get Premium Databricks Machine Learning Associate Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
18 comments · newest first
IV
Ivan 2 days ago
True, but B might lose too much info.
BO
Bo 7 days ago
But what about option B? Letting the algorithm handle it could be smart.
RO
Rosita 12 days ago
I agree, D adds context to the data.
IE
Iesha 17 days ago
I think option D is the best. It keeps track of imputed values.
SH
Shaquana 22 days ago
Letting the algorithm handle it might lead to unexpected results.
FE
Felicitas 28 days ago
Surprised that people still debate median vs mean for imputation!
SO
Sophia 1 month ago
Removing features just because they have missing values seems extreme.
ST
Steffanie 1 month ago
I think option D is a smart way to keep track of imputed values!
AN
Anissa 1 month ago
Using the mean can skew results if there are outliers.
JE
Jeanice 2 months ago
Letting the algorithm handle it might lead to unexpected results.
BE
Bettina 2 months ago
Surprised that people still debate median vs mean for imputation!
ST
Stephaine 2 months ago
Removing features just because they have missing values seems extreme.
MI
Mireya 2 months ago
I think option D is a smart way to keep track of imputed values!
SE
Selene 2 months ago
Using the mean can skew results if there are outliers.
OD
Odette 2 months ago
Removing features with missing values seems too extreme; I feel like we might lose important data that could be useful for the model.
BR
Brice 3 months ago
I practiced a question similar to this, and I think creating a binary feature for imputed values could help retain some information about the missingness.
AI
Aimee 3 months ago
I think letting the algorithm handle missing values could be a good idea, but I’m not confident about how that would impact the model's performance.
KA
Katie 3 months ago
I remember discussing how using the mean instead of the median can be sensitive to outliers, but I'm not sure if that's a better option here.
0/2000 characters

Save Cancel