Skip to content
Quantoros

Can KNNImputer use different neighbors for two missing fields of the same row?

Classic MLLevel: IntermediateFeature-specific neighbors

Can KNNImputer use different neighbors for two missing fields of the same row?

Hints
  • Donors need to contain the value being donated.
  • Missingness changes eligibility by column.

Answer

Yes. A donor must have the particular feature observed, so eligible neighbors can differ by field. Distances are computed using available shared features.

Source and licence: scikit-learn 1.7.2 — impute · BSD-3-Clause · answer: Quantoros editorial

Related questions