< Contents | Previous | Next >
What is K Nearest Neighbor Algorithm?
K-nearest neighbor is a supervised learning algorithm where the result of new instance query is classified based on majority of K-nearest neighbor category. The purpose of this algorithm is to classify a new object based on attributes and training samples.
KNN used neighborhood classification as the prediction value of the new query instance.
For example
We have data from the questionnaires survey (to ask people opinion) and objective testing with two attributes (acid durability and strength) to classify whether a special paper tissue is good or not. Here is four training samples
X1 = Acid Durability (seconds) |
X2 = Strength (kg/square meter) |
Classification |
7 |
7 |
Bad |
7 |
4 |
Bad |
3 |
4 |
Good |
1 |
4 |
Good |
Now the factory produces a new paper tissue that pass laboratory test with X1 = 3 and X2 = 7. Without another expensive survey, can we guess what the classification of this new tissue is? Fortunately, KNN algorithm can help you to predict this type of problem.
Read it off line on any device. Click here to purchase the complete E-book of this tutorial
Give your feedback and rate this tutorial
< Contents | Previous | Next >
This tutorial is copyrighted .
Preferable reference for this tutorial is
Teknomo, Kardi. K-Nearest Neighbors Tutorial. https:\\people.revoledu.com\kardi\tutorial\KNN\