Edited Nearest Neighbours Undersampling
Edited nearest neighbours (Wilson's editing) removes training rows whose label disagrees with their neighbourhood: a row is dropped when its k nearest neighbours outvote its class (or, in the strict rule, when any neighbour has another class). Applied to the majority classes it cleans the class overlap region and reduces imbalance; repeating it until nothing changes gives repeated ENN.
편집 최근접 이웃(Wilson 편집)은 라벨이 주변과 맞지 않는 학습 행을 지웁니다. k개의 최근접 이웃이 다수결로 그 행의 범주를 이기면(엄격한 규칙에서는 이웃 가운데 하나라도 다른 범주이면) 행을 빼며, 다수 범주에 적용하면 범주가 겹치는 영역을 정리하고 불균형을 줄입니다.
Which majority-class rows sit in the minority region, and does removing them help a classifier find the minority class?
소수 범주 영역에 있는 다수 범주 행은 무엇이고, 이를 지우면 분류기가 소수 범주를 더 잘 찾을까요?
The method lists how many rows of each class were removed and the imbalance ratio before and after editing. It then compares a classifier trained on original and on edited training folds by cross-validated balanced accuracy, macro F1 and minority recall, with the test folds left untouched.
When to use Edited Nearest Neighbours Undersampling
- Classes overlap and the minority class is under-detected.
- You want a cleaning step rather than synthetic oversampling.
- Features are numeric.
When to use something else
- You want to oversample the minority class: use Imbalanced Classification with SMOTE Oversampling
- You want class weights or random undersampling: use Imbalanced Classification (Resampling and Class Weights)
- Classes are balanced and well separated: no editing is needed
Assumptions and requirements
- Euclidean distance on z-scored features reflects similarity
- Noisy or overlapping majority rows, not rare minority patterns, are being removed
- Editing is applied inside training folds only
What the analysis reports
- Rows removed per class
- Imbalance ratio before and after
- Cross-validated comparison of classifiers
- Indices of removed rows
How to report it
Edited nearest neighbours (k = [value]) removed [value] of [value] majority-class rows, reducing the imbalance ratio from [value] to [value]; cross-validated balanced accuracy changed from [value] to [value].
Related methods
- Imbalanced Classification (Resampling and Class Weights)
- Imbalanced Classification with SMOTE Oversampling
- k-Nearest Neighbours
- Distance-Weighted k-Nearest Neighbours
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with direct computations (formulas, enumeration or simulation).
독립 계산. 직접 계산(식·열거·모의실험) 대조 참조 시험 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 Edited Nearest Neighbours 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.