Skip to content

Introduction to machine learning: k-nearest neighbors

Zhongheng Zhang

Annals of Translational Medicine · 2016 · 1,419 citationsOpen access

No retraction on record in OpenAlex.Check Crossref now

Cite this paper

Zhang, Z. (2016). Introduction to machine learning: k-nearest neighbors. Annals of Translational Medicine, 4(11), 218. https://doi.org/10.21037/atm.2016.03.37

In text: (Zhang, 2016)

Ask a question about this research

One question, free, no account. Anchorcite finds the papers, checks each against Crossref and links every sentence of the answer to the passage it comes from.

Abstract

Machine learning techniques have been widely used in many scientific fields, but its use in medical literature is limited partly because of technical difficulties. k-nearest neighbors (kNN) is a simple method of machine learning. The article introduces some basic ideas underlying the kNN algorithm, and then focuses on how to perform kNN modeling with R. The dataset should be prepared before running the knn() function in R. After prediction of outcome with kNN algorithm, the diagnostic performance of the model should be checked. Average accuracy is the mostly widely used statistic to reflect the kNN algorithm. Factors such as k value, distance calculation and choice of appropriate predictors all have significant impact on the model performance.

  1. lmerTest Package: Tests in Linear Mixed Effects Models2017
  2. Conducting Meta-Analyses in R with the metafor Package2010
  3. Trim and Fill: A Simple Funnel‐Plot–Based Method of Testing and Adjusting for Publication Bias in Meta‐Analysis2000
  4. seaborn: statistical data visualization2021

Metadata from OpenAlex (CC0). Citations are generated from the published record.