Skip to content

Methods · Machine learning · Imbalanced learning

Condensed Nearest Neighbour Undersampling

Condensed nearest neighbour keeps only the rows needed for the 1-nearest-neighbour rule to classify the training data correctly. Starting from the minority class and one majority row, it scans the majority rows and keeps each one that the current kept set misclassifies, repeating until a full pass keeps nothing new. Redundant majority rows deep inside their class are removed, so the classes become more balanced. A prototype-selection mode condenses every class.

1-최근접 이웃 규칙이 학습 자료를 모두 바르게 분류하는 데 필요한 행만 남기는 방법입니다. 소수 범주와 다수 범주 한 행에서 시작해 다수 범주 행을 차례로 훑으며 현재 남긴 집합이 잘못 분류하는 행을 추가하고, 한 바퀴를 돌아도 새로 추가되는 행이 없을 때까지 반복합니다. 범주 안쪽의 중복된 다수 범주 행이 빠져 범주 균형이 나아집니다.

Can I shrink the large class to the rows near the class boundary without losing what a nearest-neighbour rule needs?

다수 범주를 경계 근처의 행만 남기고 줄여도 최근접 이웃 분류에 필요한 정보를 잃지 않을 수 있습니까?

The table shows rows per class before and after; the kept set classifies all condensed rows correctly. Cross-validated balanced accuracy with full and condensed training folds shows whether undersampling helped the minority class or cost accuracy. Because noisy rows are misclassified, CNN tends to keep them; combine with a cleaning step if labels are noisy.

When to use Condensed Nearest Neighbour Undersampling

When to use something else

Assumptions and requirements

What the analysis reports

How to report it

Condensed nearest neighbour kept [value] of [value] rows (majority class [value] to [value]); cross-validated 1-NN balanced accuracy was [value] with condensed training folds against [value] with full folds.

Related methods

How this method is validated

이 방법의 검증 근거

  • Independent computation. 1 reference test compares the results with scikit-learn and direct computations (formulas, enumeration or simulation).

    독립 계산. scikit-learn·직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과.

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 Condensed Nearest Neighbour Undersampling on Quorant

Data you need
a table (CSV or Excel) with an outcome variable and predictor (feature) columns
Price
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
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 Q71060 · Reviewed 2026-10-25