Nearest Neighbour Based Classifiers - Variants
Nearest Neighbour Based Classifiers - Variants
Classifiers
Nearest neighbour classifiers
k-Nearest Neighbour (kNN) classification algorithm
● This algorithm is similar to the kNN algorithm, inasmuch as it takes the k nearest
neighbours into consideration.
● The only difference is that these k nearest neighbours are weighted according to
their distance from the test point. It is also called the distance-weighted
k-nearest neighbour algorithm.
Each of the neighbours is associated with the weight w which is defined as
where j = 1, .., k. The value of wj varies from a maximum of 1 for the nearest
neighbour down to a minimum of zero for the most distant.
Note: d1 is the distance of test pattern P to the most nearest neighbour.
Similarly, dk is the dist. Of P to the most farthest neighbout.
● Having computed the weights wj, theMkNN algorithm assigns the test
pattern P to that class for which the weights of the representatives among
the k nearest neighbours sums to the greatest value.
● Instead of using the simple majority rule, it can be observed that MkNN
employs a weighted majority rule. This would mean that outlier patterns have
lesser effect on classification.
Fuzzy kNN Algorithm
● In this algorithm, the concept of fuzzy sets, whose elements have a degree of
membership, is used. In classical set theory, an element either belongs or does
not belong to a set.
● In fuzzy sets, the elements of the set have a membership function attached to
them which is in the real unit interval [0, 1].
● The membership value of each pattern to each class depends on the class of its k
neighbours.
r-Near Neighbours