arrow
Return

kNNPC (k-Nearest Neighbor Algorithm Per-Class): Classification Method Predicting Extrapolation Regions With Reasonable Probability

delete2026-05-14
delete0
delete
OA
AI
H
Hiromasa Kaneko *
DOI:10.1002/cem.70135delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
In classification tasks, predicted class probabilities are often overconfident for samples outside the training distribution, which can lead to unsafe decision-making. kNNPC, a k-nearest neighbor algorithm per class, is proposed to mitigate such overconfidence under extrapolation or distribution shift. For a given test sample, kNNPC adjusts the predicted class-probability vector so that it becomes closer to a maximum-uncertainty distribution when the sample is dissimilar to the training data in the feature space. Importantly, kNNPC is not intended to identify extrapolation regions explicitly; rather, it provides a conservative probability output that serves as a practical safeguard against overconfident predictions. kNNPC was evaluated on benchmark and real-world datasets, including the Iris dataset, a toxicity classification dataset, and a superconducting critical-temperature dataset, and compares with standard probabilistic classifiers. The results indicate that kNNPC can effectively suppress overconfident probabilities for out-of-domain samples while maintaining comparable predictive performance. The Python code for the proposed method is available at https://github.com/hkaneko1985/dcekit.
Keywords:
classification
extrapolation regions
k-nearest neighbor algorithm
material design
molecular design
probability

Journal

J
Journal of Chemometrics
IF:
2.1
Papers:
60
Citations:
3.9K

Organization

M
Meiji University
Scholars:
1.8K
Papers: 1.5K
Citations: 1.1K