Institutional Repository of Vilnius University
Handling class imbalance in k-nearest neighbors /
Abstract
dc:descriptionThis work introduces Stochastic Inference-Time Rebalancing kNN (STIR-kNN), an inference-time modification of the k-nearest neighbor classifier for imbalanced binary classification. The proposed method aims to improve minority-class recall while limiting the corresponding loss in majority-class precision, without modifying the training data. STIR-kNN combines adaptive neighborhood expansion with a stochastic vote-adjustment mechanism that selectively rebalances local class influence when minority-class evidence is detected. The approach is evaluated against standard kNN and kNN trained on SMOTE-augmented data across datasets with varying imbalance ratios, including numerical, heterogeneous, and time-dependent historical data. Experimental results demonstrate that STIR-kNN consistently enhances minority-class recall while maintaining competitive overall performance, highlighting the effectiveness of inference-time rebalancing for imbalanced kNN classification. These findings suggest that inference-time neighborhood rebalancing is an effective and flexible strategy for addressing class imbalance in kNN classifiers. STIR-kNN demonstrates that substantial gains in minority detection can be achieved without retraining or synthetic data generation, making it well-suited for applications where data integrity and deployment simplicity are critical.
Degree
thesis:*- Grantor dc:publisher
- Institutional Repository of Vilnius University
- Year dc:date
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Matvejevaitė, Jovita,
Subjects
dc:subject × 1Rights
dc:rights- Statement dc:rights
-
- info:eu-repo/semantics/openAccess
- Language dc:language
- eng
Identifiers
dc:identifier.*- Repository record dc:identifier
- https://repository.vu.lt/VU:ELABAETD277679847&prefLang=en_US