Pattern Recognition & Clustering
Pattern Recognition & Clustering
Pattern: A pattern is the description of an object. More precisely it is the description of any
member of a category representing a pattern class.
Pattern Class: It is a category determined by some given common attributes.
Example: Alphanumeric character and Chinese characters are patterns and character is a
pattern class.
Pattern Recognition: Pattern recognition can be defined as the categorization of input data
into identifiable classes via the extraction of significant features or attributes of the data from
a background of irrelevant detail.
Contextual
Analysis
Preprocessing &
Objects Measurements Feature vectors
Sensing Feature Selection Categorization
or primitives
Estimation
Adaption Learning
Clustering Concept
Solution:
Let,
X1= (0, 0), X2= (0, 1), X3= (5, 4), X4= (5, 5), X5= (4, 5), X6= (1, 0), X7= (4, 2), X8= (0, 4)
Similarly,
D (Z1, X3) = 6.40; which is greater than T. So, Z2= X3= (5, 4)
D (Z2, X4) = 1;
D (Z1, X6) = 1;
D (Z1, X8) = 4;
D (Z2, X8) = 5; All are greater than T, So, Z4= X8= (0, 4)
D (Z3, X8) =4.472; X1 Z1
Hence, X2
S (Z3) = {X7} X5
S (Z4) = {X8} X6
X7 Z3
X8 Z4
2. Apply maximin distance algorithm on given dataset:
(0, 0), (0, 1), (5, 4), (5, 5), (4, 5), (1, 0), (4, 2), (0, 4)
Letting (0, 0) as first cluster and fraction= .
Solution:
Let,
X1= (0, 0), X2= (0, 1), X3= (5, 4), X4= (5, 5), X5= (4, 5), X6= (1, 0), X7= (4, 2), X8= (0, 4)
D (Z1, X6) = 1;
D (Z2, X3) = 1;
D (Z2, X5) = 1;
Min(X8) = 4 (Z1)
Here, Max2= 4, 2
And, Max2>
4> 3.52
So, Z3= X8= (0, 4)
D (Z3, X3) = 5;
Min(X6) = 1 (Z1)
3.162> 2.76
D (Z4, X5) = 3;
Calculating Min3 [D (Z1, Xi), D (Z2, Xi), D (Z3, Xi), D (Z4, Xi)]
Min(X6) = 1 (Z1)
Here Max4= 1, 2
And Max4
X1 Z1
So program will be terminated
X2
Hence X3
S (Z1) = {X1, X2, X6} X4 Z2
S (Z3) = {X8} X6
S (Z4) = {X7} X7 Z3
X8 Z4
3. Apply K- means algorithm to the data set given:
(0, 0), (0, 1), (5, 4), (5, 5), (4, 5), (1, 0), (4, 2), (0, 4)
Letting K=3 and the first three samples as first three centers.
Solution:
Let,
X1= (0, 0), X2= (0, 1), X3= (5, 4), X4= (5, 5), X5= (4, 5), X6= (1, 0), X7= (4, 2), X8= (0, 4)
S (Z1 (1)) = {X1, X6} S (Z2 (1)) = {X2, X8} S (Z3 (1)) = {X3, X4, X5, X7}
0 0 0 0 0
Z1 (2) = ( , ) Z2 (2) = ( , ) Z3 (2) = ( , )
= (0.5, 0) = (0, 2.5) = (4.5, 4)
S (Z1 (2)) = {X1, X2 X6} S (Z2 (2)) = {X8} S (Z3 (2)) = {X3, X4, X5, X7}
Z1 (3) = (
0 0
,
0 0
) Z2 (3) = (0, 4) Z3 (3) = ( , )
= (4.5, 4)
= (0.33, 0.33)
D(Z1 (3),Xi) D(Z2 (3) ,Xi) D(Z3 (3) ,Xi)
D (Z1 (3), X1) = 0.467; D (Z2 (3), X1) = 4; D (Z3 (3), X1) = 6.02;
D (Z1 (3), X2) = 0.747; D (Z2 (3), X2) = 3; D (Z3 (3), X2) = 5.408;
D (Z1 (3), X3) = 5.94; D (Z2 (3), X3) = 5; D (Z3 (3), X3) = 0.5;
D (Z1 (3), X4) = 6.604; D (Z2 (3), X4) = 5.099; D (Z3 (3), X4) = 1.118;
D (Z1 (3), X5) = 5.94; D (Z2 (3), X5) = 4.123; D (Z3 (3), X5) = 1.118;
D (Z1 (3), X6) = 0.747; D (Z2 (3), X6) = 4.123; D (Z3 (3), X6) = 5.315;
D (Z1 (3), X7) = 4.03; D (Z2 (3), X7) = 4.47; D (Z3 (3), X7) = 2.06;
D (Z1 (3), X8) =3.68; D (Z2 (3), X8) =0; D (Z3 (3), X8) =4.5;
S (Z1 (3)) = {X1, X2 X6} S (Z2 (3)) = {X8} S (Z3 (3)) = {X3, X4, X5, X7}
Z1 (4) = (
0 0
,
0 0
)
Z2 (4) = (0, 4) Z3 (4) = ( , )
= (4.5, 4)
= (0.33, 0.33)
Z2 (3) = Z2 (4)
Z3 (3) = Z3 (4)