Introduction to AI &ML(21CS752)
MODULE 4
CHAPTER 4 - SIMILARITY-BASED LEARNING
4.1 Similarity or Instance-based Learning
4.1.1 Difference between Instance-and Model-based Learning
Some examples of Instance-based Learning algorithms are:
a) KNN
b) Variants of KNN
c) Locally weighted regression
d) Learning vector quantization
e) Self-organizing maps
f) RBF networks
Nearest-Neighbor Learning
A powerful classification algorithm used in pattern recognition.
K nearest neighbors stores all available cases and classifies new cases based on a
similarity measure (e.g distance function)
One of the top data mining algorithms used today.
A non-parametric lazy learning algorithm (An Instance based Learning method).
Used for both classification and regression problems.
Dr. Sudhamani M J, Professor, Dept. Of CSE,RNSIT 1
Introduction to AI &ML(21CS752)
Here, 2 classes of objects called
C1 and C2. When given a test
instance T, the category of this test
instance is determined by looking
at the class of k=3 nearest
neighbours. Thus, the class of this
test instance T is predicted as C2.
Algorithm 4.1: k-NN
Dr. Sudhamani M J, Professor, Dept. Of CSE,RNSIT 2
Introduction to AI &ML(21CS752)
4.3 Weighted k-Nearest-Neighbour Algorithm
The weighted KNN is an extension of k-NN. It chooses the neighbours by using the
weighted distance. In weighted kNN, the nearest k points are given a weight using a
function called as the kernel function. The intuition behind weighted kNN, is to give more
weight to the points which are nearby and less weight to the points which are farther
away.
SUMMARY
Dr. Sudhamani M J, Professor, Dept. Of CSE,RNSIT 3
Introduction to AI &ML(21CS752)
Dr. Sudhamani M J, Professor, Dept. Of CSE,RNSIT 4