human learn logo human learn: missing

1 2 3 4 5 6 7 8
Notes

Because we are drawing machine learning models we are robust against certain side-effects that we might have in production. Let's see how we're robust against missing values.

old_example = pd.DataFrame([{
    'island': 'Torgersen',
    'bill_length_mm': 39.1,
    'bill_depth_mm': 18.7,
    'flipper_length_mm': 220.0,
    'body_mass_g': 5750.0,
    'sex': 'male'}
])

new_example = pd.DataFrame([{
    'island': 'Torgersen',
    'bill_length_mm': np.nan,
    'bill_depth_mm': 18.7,
    'flipper_length_mm': 220.0,
    'body_mass_g': 5750.0,
    'sex': 'male'}
])

model.predict_proba(old_example)
model.predict_proba(new_example)