How can a Random Forest proximity matrix be used for missing value imputation?

Last updated 5 November 2026

  • Proximity prox(i, j) is the fraction of trees where samples i and j share a leaf, a supervised similarity that handles mixed feature types.

  • Rough-fill with median/mode, grow a forest, then replace each missing value with a proximity-weighted average (numeric) or highest-proximity category. Repeat 4 to 6 times (R's rfImpute).

  • Caveats: needs the target (awkward for test rows), costs O(n²) memory, and makes post-imputation OOB error optimistic.

  • https://www.rdocumentation.org/packages/randomForest/versions/4.7-1.2/topics/rfImpute
  • https://rpubs.com/david-deming-tung/missing_data
  • https://medium.com/@meetp.tvd/random-forest-algorithm-in-machine-learning-5438af634f22
All Random Forests interview questions