Skip to content

Methods · Machine learning · Supervised learning basics · K-Nearest Neighbors (KNN)

Mahalanobis-metric k-nearest-neighbour classification

k-nearest-neighbour prediction using distances scaled by the pooled within-class covariance, with neighbour-share posterior probabilities.

마할라노비스 거리 k-최근접 이웃 — 집단 내 합동 공분산으로 척도화한 거리로 k-최근접 이웃 예측을 하고, 이웃 비율로 사후확률을 구합니다.

Runs K-Nearest Neighbors (KNN) with: knn metric set to “mahalanobis”; n neighbors set to “5”.

기본 방법(K-Nearest Neighbors (KNN))에 다음 설정을 고정해 실행합니다: knn metric = mahalanobis; n neighbors = 5.

My predictors are correlated and on different scales; how do I classify cases by nearest neighbours fairly?

예측변수가 서로 상관되고 척도도 다른데, 최근접 이웃으로 사례를 공정하게 분류하려면 어떻게 하나요?

Distances are scaled by the pooled within-class covariance, so correlated and differently scaled predictors do not dominate, and posterior probabilities are the class shares among the k neighbours. Behind it is K-Nearest Neighbors (KNN) with knn_metric = mahalanobis, n_neighbors = 5 already set; checks and report are the same as for K-Nearest Neighbors (KNN).

When to use Mahalanobis-metric k-nearest-neighbour classification

When to use something else

What you still provide

Assumptions and requirements

The same as for K-Nearest Neighbors (KNN):

What the analysis reports

The output of K-Nearest Neighbors (KNN), with the preset shown in the settings:

How this is validated

검증 근거

This variant runs the same engine as K-Nearest Neighbors (KNN) with the settings above fixed, so the evidence is that method’s: report tables cross-checked against r; no reference comparison of the main estimates yet. No separate checks of this preset are claimed. Read the base method’s validation record.

이 설정 묶음은 K-Nearest Neighbors (KNN)와 같은 엔진으로 돕니다. 검증 근거는 기본 방법의 것이며, 이 설정만 따로 검증했다고 주장하지 않습니다.

Run this variant

Data you need
a table (CSV or Excel) with an outcome variable and predictor (feature) columns
Price
Same as K-Nearest Neighbors (KNN): 400 credits for one analysis up to 10,000 rows (complexity level 3); larger or wider data costs more. Optional methodologist review: 1800 credits.
Checking
Report tables cross-checked against R; no reference comparison of the main estimates yet, as recorded for K-Nearest Neighbors (KNN) (see its checks)
Before you pay
A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.

Preset ID Q71015-V01 · Variant of Q71015 · Reviewed 2026-10-25