Missing Indicator

noun

say it: “MIS-ing IN-dih-kay-ter” /ˈmɪsɪŋ ˈɪndəˌkeɪtər/

An extra column of 1s and 0s that records which values were missing before they were filled in.

What is a missing indicator?

A missing indicator is an extra column that holds 1 where a value was missing before it was filled, and 0 elsewhere. Filling a gap hides that it was there, and sometimes the gap itself means something, such as an age left blank for strays. SimpleImputer(add_indicator=True) adds one.

import numpy as np
from sklearn.impute import SimpleImputer
ages = [[2], [np.nan], [10]]
print(SimpleImputer(strategy="median", add_indicator=True).fit_transform(ages))
# [[ 2.  0.]
#  [ 6.  1.]     the gap: filled with 6, marked with 1
#  [10.  0.]]

In a sentence

  • “The missing indicator let the model learn that strays with no recorded age were adopted more slowly.”
  • “add_indicator=True put a missing indicator beside the filled ages.”

Level: Journeyman · More AI Basics terms at this level

Updated