Author
Listed:
- Elif Kartal
(Faculty of Economics, İstanbul University, Department of Management Information Systems)
- Fatma Çalışkan
(Faculty of Science, İstanbul University, Department of Mathematics, Algebra and Number Theory Division)
- Beyaz Başak Eskişehirli
(Faculty of Science, İstanbul University, Department of Mathematics, Analysis and Theory of Function Division)
- Zeki Özen
(Faculty of Economics, İstanbul University, Department of Management Information Systems)
Abstract
In the literature, most distance functions used for distance-based machine learning algorithms are based on the usual absolute value function on the field $$\mathbb {Q}$$ Q of rational numbers. On the other hand, Ostrowski’s theorem states that every non-trivial absolute value on $$\mathbb {Q}$$ Q is equivalent to either the usual absolute value or a p-adic absolute value for some prime p. In this study, a new p-adic distance function, the p-adic Euclidean distance, is defined based on the p-adic absolute value. This paper represents the first systematic investigation of both the p-adic Euclidean distance and the p-adic Chebyshev distance (referred to in the literature as the p-adic max-norm) within the k-nearest neighbor (k-NN) framework. Together with the previously proposed p-adic Manhattan distance, these distance functions are employed in k-NN models and evaluated on 30 publicly available datasets. Their performance is compared with that of k-NN models using 14 conventional distance functions commonly found in the literature. In the analyses, binary and multi-class classification were performed with datasets containing categorical, numerical, and mixed types of predictive attributes. To find the best performance values of the models, the number of neighbors k was examined for numbers varied from 2 to 20, and the prime number parameter p of p-adic distance was tested for numbers less than 29. The performance of the 17 distance functions used in the models was evaluated in terms of accuracy, recall, precision, and F1-score. In 13 of the 30 datasets, the models with p-adic distances were among the top five performers. When the datasets were analyzed separately as categorical, numerical, and mixed types, models employing p-adic distances achieved the highest classification accuracy in 14 out of 30 datasets. In numerical and mixed datasets, it was observed that the precision of decimal values influenced the performance of the analysis. These results suggest that the use of p-adic distances in the k-NN algorithm is particularly effective in categorical and mixed data scenarios, often surpassing many commonly used distance functions in the literature.
Suggested Citation
Elif Kartal & Fatma Çalışkan & Beyaz Başak Eskişehirli & Zeki Özen, 2026.
"p-Adic Distance Functions and Comparative Performance Analysis of Distance Functions with the k-NN Classifier,"
Journal of Classification, Springer;The Classification Society, vol. 43(2), pages 477-502, July.
Handle:
RePEc:spr:jclass:v:43:y:2026:i:2:d:10.1007_s00357-026-09543-8
DOI: 10.1007/s00357-026-09543-8
Download full text from publisher
As the access to this document is restricted, you may want to
for a different version of it.
Corrections
All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:spr:jclass:v:43:y:2026:i:2:d:10.1007_s00357-026-09543-8. See general information about how to correct material in RePEc.
If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.
We have no bibliographic references for this item. You can help adding them by using this form .
If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.
For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .
Please note that corrections may take a couple of weeks to filter through
the various RePEc services.