Missing Values, Exactly

Explicit missingness masks, train-only mean and mode imputation, indicator columns, and what imputation cannot recover.

Missing Values Step by Step

Keep missing entries visible, fit replacement statistics on training rows only, and preserve missingness indicators.

  1. Missing Cells Stay Visible

    explicit binary masks that keep unrecorded entries distinct from zero

  2. Numeric Missing Uses the Mean

    train-only observed mean imputation for a numeric feature column

  3. Categorical Missing Uses the Mode

    train-only mode imputation on integer-encoded category labels

  4. Fill the Displayed Table

    column-specific train-only fill rules combined into one complete matrix

  5. Add Missingness Indicators

    preserve the fact of absence alongside each filled column

  6. What Missing Handling Is and Is Not

    finite arithmetic and honest scoring, not recovery of unseen truth