JOURNAL ARTICLE

A Neural Network Based Distance Function for the k-Nearest Neighbor Classifier

Abstract

Due to its simplicity and intuitivity, the k-nearest neighbor method is one of the most commonly used technique to address different classification problems. However, to apply such a classification technique, a distance metric is to be considered to define a certain distance in the feature space. Usually classic norms such as Minkowski, Mahalanobis, etc. Are used, but even though they can be applied to all type of feature spaces, there is a lack of specificity of these methods for the data in use. Our goal is to learn the distance function rather than providing an explicit one, by exploiting the specificity of the data. Several neural networks are trained to estimate the distance between two patterns, adapting the weight of the networks accordingly. For the experimental setup, we considered three well-known benchmark, publicly available data collections: MNIST digit data, Opt-digits data, and the Lampung character collection - for Arabic handwritten digits and Indonesian handwritten Lampung characters, respectively. The results of k-nearest neighbor considering network based estimated distance between the handwritten digits/characters proved to be very promising.

Keywords:
MNIST database k-nearest neighbors algorithm Mahalanobis distance Pattern recognition (psychology) Computer science Minkowski distance Feature vector Artificial intelligence Handwriting recognition Artificial neural network Euclidean distance Classifier (UML) Feature extraction

Metrics

1
Cited By
0.00
FWCI (Field Weighted Citation Impact)
22
Refs
0.06
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Face and Expression Recognition
Physical Sciences →  Computer Science →  Computer Vision and Pattern Recognition
Machine Learning and Data Classification
Physical Sciences →  Computer Science →  Artificial Intelligence
Imbalanced Data Classification Techniques
Physical Sciences →  Computer Science →  Artificial Intelligence
© 2026 ScienceGate Book Chapters — All rights reserved.