Weight-updated iterative k-nearest neighbor algorithm for managing outliers and class imbalance

Document Type

Article

Source of Publication

Applied Soft Computing

Publication Date

7-1-2026

Abstract

The k-Nearest Neighbors algorithm is one of the most used algorithms to classify data. Nonetheless, the primary causes of its deteriorating performance are outliers and class imbalance. To reduce their effects, this work therefore presents a novel iterative-based weight-updated kNN algorithm (IWUkNN). The iterative architecture of IWUKNN continuously decreases the influence of outliers as the neighbors of the query that was incorrectly classified are slightly adjusted during each iteration. Any outliers that lead to misclassification will have minimal impact after a few rounds. For class imbalance, IWUkNN applies a class-wise weighted sum of neighbors to tackle the majority voting. Also, instances from the minority class with neighbors of the same class with higher weights will still be influential, even if the data point is surrounded by more labels from the majority class. Eventually, the majority-class labels' contribution to the classification is progressively reduced over iterations. The distinction of IWUkNN over its competitors lies in its simple construction and competitive performance, which increases its competitiveness and generalization. A thorough evaluation against nineteen models is done in eight phases using several evaluation metrics across eighty datasets. The findings, supported by multi-criteria analysis, show that IWUkNN significantly outperforms its state-of-the-art competitors by 5%–8%, on average, both generally and for specific k values, on all tests, demonstrating its effectiveness in controlling outlier contamination and class imbalance.

ISSN

1568-4946

Publisher

Elsevier BV

Volume

198

Disciplines

Computer Sciences

Keywords

Class Imbalance, Data Classification, KNN, Machine Learning, Noisy data, Outliers

Scopus ID

105036709806

Indexed in Scopus

yes

Open Access

no

Share

COinS