Le 4
Le 4
xi belongs to category ti
0.9
1
1 2
1
0.8 22
1 1
1 2 2 2
0.7 1 C 2 2
1
3 2
0.6
1 1 3 2
A
0.5 3
3
3
0.4
B 3
3
0.3 3
3
0.2
3
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
3
Solution:
4
The k nearest neighbor rule (k-nn)
5
1. Calculate the distance between Andy’s marks
and those of 5 applicants. d1 = 125, d2 = 100,
d3 = 400, d4 = 400 and d5 = 150.
6
1
0.9
0.8 1
1 1
1
0.7
1
1 1
0.6 C
1 1
0.5 1
2
B
0.4
2
2
2 2
0.3
2 A
2
2
0.2
0.1 2
2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
10
On-line K-means clustering algorithm:
3. Set cnew
k as cold
k ;
11
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
12