Skip to content

Methods · Missing data · Single imputation

kNN Imputation with Gower Distance (Mixed Types)

Nearest-neighbour imputation with Gower distance fills a missing value from the k most similar rows that have it observed. Gower distance compares numeric variables by their range-scaled absolute difference and categorical variables by match or mismatch, averaging over the variables observed in both rows, so it works with mixed data and with other missing values.

가우어 거리 최근접 이웃 대체는 빈 값을 그 값이 관측된 가장 비슷한 k개 행에서 가져와 채웁니다. 가우어 거리는 숫자 변수를 범위로 나눈 절대차로, 범주 변수를 일치 여부로 비교하고 두 행 모두에서 관측된 변수만으로 평균하므로 혼합형 자료와 다른 결측에도 쓸 수 있습니다.

How do I fill gaps in a data set that mixes numbers and categories using the most similar complete records?

숫자와 범주가 섞인 자료의 빈 칸을 가장 비슷한 기록으로 어떻게 채웁니까?

The method imputes each missing numeric value by the median (or mean) of the k nearest donors and each missing category by the donors' most frequent category, and reports per variable how many cells were filled, the mean donor distance and the means or modal shares before and after imputation.

When to use kNN Imputation with Gower Distance (Mixed Types)

When to use something else

Assumptions and requirements

What the analysis reports

How to report it

Missing values ([value] cells) were imputed by k-nearest-neighbour imputation with Gower distance (k = [value]).

Related methods

How this method is validated

이 방법의 검증 근거

  • Independent computation. 1 reference test compares the results with reference values computed independently in the test suite at a stated tolerance of 1e-12.

    독립 계산. 시험에서 따로 계산한 참조값 대조 참조 시험 1건 통과(허용오차 1e-12).

Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.

허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.

Run kNN Imputation with Gower Distance (Mixed Types) on Quorant

Data you need
a table (CSV or Excel) with predictor (feature) columns
Price
250 credits for one analysis up to 10,000 rows (complexity level 2); larger or wider data costs more. Optional methodologist review: 1200 credits.
Checking
Compared with independent computations
Before you pay
A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.

Method ID Q14022 · Reviewed 2026-10-25