Substitution and Flags for Missing Features

A missing feature can be represented by a chosen replacement and a separate indication of absence where the model and domain support it.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace two ages of data
  2. Choose the replacement from training information
  3. Preserve whether an imputed value was observed
  4. Check why information is missing in the serving context

Trace two ages of data

If an unavailable reading is replaced with zero, an actual zero reading can then have the same numeric value. A separate missing flag preserves a difference for the model. See missing data propagation.

Choose the replacement from training information

A mean or median replacement learned from examples should carry its fitted value into evaluation. Fitting preprocessing sets that boundary.[1][2]

Preserve whether an imputed value was observed

Suppose a training median of four fills missing entries. One original value four becomes feature pair \((4,0)\), while a missing value becomes \((4,1)\) where the second coordinate marks absence. The model can distinguish these cases if the indicator is useful. See missing and zero values.

Observed 4 → (4,0)
Missing → (4,1)
Observed 0 → (0,0)
Imputation statistic comes from training only

Check why information is missing in the serving context

Missingness can correlate with processes that change after deployment. Compare performance on observed and missing cases and confirm the indicator is available at prediction time.

References

  1. Gareth James et al., An Introduction to Statistical Learning ↩
  2. scikit-learn Developers, Metrics and Scoring: Quantifying the Quality of Predictions ↩