/ THE IDEA
One simple method inserts the mean, or average, of the observed training values in that column. Another uses the median, the middle value after sorting, which is less influenced by an unusually large observation. More elaborate methods estimate the missing value from other measurements. Every method makes assumptions about what the blank can reasonably stand for. A separate missingness indicator can record whether the value was supplied or filled. That lets a model distinguish an actual average-looking journey from one whose distance was unknown. It preserves a fact about the record, but it still cannot manufacture the missing physical measurement.
THE FORMAL IDEA
x_filled = x if observed; otherwise m
| x is the original input, here distance in kilometres; m is a replacement value learned from observed training distances. | | A companion indicator is 0 for an observed value and 1 for a missing one. These numbers describe availability, not journey length. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Observed training distances are 2, 4 and 6 km: mean m = (2+4+6)/3 = 4 km. Toy prediction: time in minutes = 10 min + (2 min/km)×distance in km. Fill a blank with 4 km: prediction is 10+2×4 = 18 minutes. Change the fill rule to a hypothetical 6 km estimate: prediction becomes 10+2×6 = 22 minutes.
|
The real journey did not grow by two kilometres. The prediction changed because the assumption inserted into the calculation changed. Recording which values were filled makes that uncertainty visible. Without the indicator or a separate audit record, an invented four can become indistinguishable from a measured four.
/ SO WHAT?
The reason for missingness matters. A device failing at random produces a different problem from staff omitting distance only for exceptionally long trips. Filling every blank with an average can systematically understate that second group. Before selecting a clever replacement algorithm, ask who leaves the field blank, when it happens and what information is lost.
ONE CAVEAT |
| Imputation can reduce variability and hide uncertainty if filled values are treated as known facts. Some models handle missing values directly. Fit any replacement rule on appropriate training data and apply the same rule consistently to later records. |
KEEP THIS
A filled value is an explicit assumption, so changing the replacement can change a prediction even when no new measurement has arrived.
|
NEXT: Why can the same circuit resist slow changes more?
|