Challenge - 5 Problems
Missing Values Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Why is it important to handle missing values before training a machine learning model?
Choose the best reason why missing values must be handled before training a model.
Attempts:
2 left
❓ Predict Output
intermediate2:00remaining
What is the output of this code that fills missing values with the column mean?
Given the following code, what will be the resulting DataFrame?
ML Python
import pandas as pd import numpy as np df = pd.DataFrame({'A': [1, np.nan, 3], 'B': [4, 5, np.nan]}) df_filled = df.fillna(df.mean()) print(df_filled)
Attempts:
2 left
❓ Model Choice
advanced2:00remaining
Which model type is most robust to missing values without imputation?
Choose the model that can handle missing values internally without needing to fill them first.
Attempts:
2 left
❓ Metrics
advanced2:00remaining
How does improper handling of missing values affect model evaluation metrics?
What is the most likely effect on accuracy if missing values are dropped from the test set but not from the training set?
Attempts:
2 left
🔧 Debug
expert2:00remaining
What error does this code raise when imputing missing values with scikit-learn's SimpleImputer?
Examine the code below and select the error it produces when run.
ML Python
from sklearn.impute import SimpleImputer import numpy as np X = np.array([[1, 2], [np.nan, 3], [7, 6]]) imputer = SimpleImputer(strategy='median') X_imputed = imputer.fit_transform(X) print(X_imputed)
Attempts:
2 left