An Efficient Algorithm for Bayesian Nearest Neighbours
Giuseppe Nuti ()
Additional contact information
Giuseppe Nuti: University College London
Methodology and Computing in Applied Probability, 2019, vol. 21, issue 4, 1251-1258
Abstract:
Abstract K-Nearest Neighbours (k-NN) is a popular classification and regression algorithm, yet one of its main limitations is the difficulty in choosing the number of neighbours. We present a Bayesian algorithm to compute the posterior probability distribution for k given a target point within a data-set, efficiently and without the use of Markov Chain Monte Carlo (MCMC) methods or simulation—alongside an exact solution for distributions within the exponential family. The central idea is that data points around our target are generated by the same probability distribution, extending outwards over the appropriate, though unknown, number of neighbours. Once the data is projected onto a distance metric of choice, we can transform the choice of k into a change-point detection problem, for which there is an efficient solution: we recursively compute the probability of the last change-point as we move towards our target, and thus de facto compute the posterior probability distribution over k. Applying this approach to both a classification and a regression UCI data-sets, we compare favourably and, most importantly, by removing the need for simulation, we are able to compute the posterior probability of k exactly and rapidly. As an example, the computational time for the Ripley data-set is a few milliseconds compared to a few hours when using a MCMC approach.
Keywords: K-nearest neighbour; Non-parametric classification; Bayesian classification; 62F15 Bayesian Inference; 60G25 Prediction Theory (search for similar items in EconPapers)
Date: 2019
References: View references in EconPapers View complete reference list from CitEc
Citations:
Downloads: (external link)
http://link.springer.com/10.1007/s11009-018-9670-z Abstract (text/html)
Access to the full text of the articles in this series is restricted.
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:spr:metcap:v:21:y:2019:i:4:d:10.1007_s11009-018-9670-z
Ordering information: This journal article can be ordered from
https://www.springer.com/journal/11009
DOI: 10.1007/s11009-018-9670-z
Access Statistics for this article
Methodology and Computing in Applied Probability is currently edited by Joseph Glaz
More articles in Methodology and Computing in Applied Probability from Springer
Bibliographic data for series maintained by Sonal Shukla () and Springer Nature Abstracting and Indexing ().