Skip to Main Content
Machine Learning
book

Machine Learning

by Mohssen Mohammed, Muhammad Badruddin Khan, Eihab Mohammed Bashier
August 2016
Intermediate to advanced content levelIntermediate to advanced
204 pages
3h 51m
English
CRC Press
Content preview from Machine Learning

Chapter 5

The k-Nearest Neighbors Classifiers

5.1 Introduction

In pattern recognition, the k-nearest neighbors algorithm (or k-NN for short) is a nonparametric method used for classification and regression [1]. In both cases, the input consists of the k closest training examples in the feature space. The output depends on whether k-NN is used for classification or regression:

  • ■ In k-NN classification, the output is a class membership. An object is classified by a majority vote of its neighbors, with the object being assigned to the class most common among its k-NN (k is a positive integer, typically small). If k = 1, then the object is simply assigned to the class of that single nearest neighbor.

  • ■ In k-NN regression, the output is the property ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Machine Learning

Machine Learning

Subramanian Chandramouli, Saikat Dutt, Amit Kumar Das
Machine Learning

Machine Learning

Sergios Theodoridis

Publisher Resources

ISBN: 9781315354415