EUVIMEDOpdag EUVIMED
Open access · CC BY 4.0

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

Hiromasa Kaneko

Journal of Chemometrics · 2026-06 · 40 (6)

DOI: 10.1002/cem.70135 ↗

At a glance

Journal article in Journal of Chemometrics, published online on 2026-05-14. Written by Hiromasa Kaneko. 21 references. The full text is freely available (open access, CC BY 4.0). Funded by: Japan Society for the Promotion of Science.

AbstractBibliografiske oplysningerCiteRelated studies

Abstract (original language)

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 .

Funding

  • Japan Society for the Promotion of Science

Cite

APA

Kaneko, H. (2026). kNNPC (k‐Nearest Neighbor Algorithm Per‐Class): Classification Method Predicting Extrapolation Regions With Reasonable Probability. Journal of Chemometrics, 40(6). https://doi.org/10.1002/cem.70135

Vancouver

Kaneko H. kNNPC (k‐Nearest Neighbor Algorithm Per‐Class): Classification Method Predicting Extrapolation Regions With Reasonable Probability. Journal of Chemometrics. 2026;40(6). doi:10.1002/cem.70135

BibTeX
@article{Kaneko2026,
  author = {Kaneko, Hiromasa},
  title = {kNNPC (k‐Nearest Neighbor Algorithm Per‐Class): Classification Method Predicting Extrapolation Regions With Reasonable Probability},
  journal = {Journal of Chemometrics},
  year = {2026},
  volume = {40},
  number = {6},
  doi = {10.1002/cem.70135}
}
Start for free →