# k-Nearest Neighbour Classifiers: 2nd Edition (with Python examples)

Source: [k-Nearest Neighbour Classifiers: 2nd Edition (with Python examples)](<https://www.sota2.com/research/paper/68fa6a791e209131cea2860c>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-25T23:25:36.663Z

Authors: Padraig Cunningham, Sarah Jane Delany

Published: 2020-04-09T13:00:05.000Z

## Abstract

Perhaps the most straightforward classifier in the arsenal or machine learning techniques is the Nearest Neighbour Classifier -- classification is achieved by identifying the nearest neighbours to a query example and using those neighbours to determine the class of the query. This approach to classification is of particular importance because issues of poor run-time performance is not such a problem these days with the computational power that is available. This paper presents an overview of techniques for Nearest Neighbour classification focusing on; mechanisms for assessing similarity (distance), computational issues in identifying nearest neighbours and mechanisms for reducing the dimension of the data.   This paper is the second edition of a paper previously published as a technical report. Sections on similarity measures for time-series, retrieval speed-up and intrinsic dimensionality have been added. An Appendix is included providing access to Python code for the key methods.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Text Classification on NKI Evaluation Suite (SST-2, SST-5, CoLA, TREC, CR, MPQA, Subj) (test)](<https://www.sota2.com/research/sota/text-classification-on-nki-evaluation-suite-sst-2-sst-5-cola-trec-cr-mpqa-subj-test.md>): Text Classification; NKI Evaluation Suite SST-2, SST-5, CoLA, TREC, CR, MR, MPQA, Subj (test); SST-2 Accuracy: 64.5.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2004.04523>)

[PDF](<https://arxiv.org/pdf/2004.04523.pdf>)
