Wednesday, October 8, 2008

A19 - Probabilistic Classification

I used the test image data in Activity 18.
group 1 - one peso coins
group 2 - 25 centavo coins

x - features of all data

66511 0.926294
66473 0.949915
66511 0.777889
45555 1.163125
48126 0.777889
47958 0.930314

y - group of the object of all data.
y = [1;1;1;2;2;2]

x1 - group 1
x1 = [66511 0.926294;66473 0.949915; 66511 0.777889];

x2 - group 2
x2 = [45555 1.163125; 48126 0.777889; 47958 0.930314];

u1 - mean of features of group 1
66498.333
0.8846993

u2 - mean of features of group 2
47213.
0.9571093

u - mean features of all
56855.667
0.9209043

x0 - mean corrected data

Therefore,
x01 x02
9655.333 -11300.7
0.00539 0.242221
9617.333 -8729.67
0.029011 -0.14302
9655.333 -8897.67
-0.14302 0.00941


c1 and c2 are covariance of each group.
c1 =
92981341 -349.939
-349.939 0.007108

c2 =
94360206 -524.168
-524.168 0.026404


C - group Covariance
C =
93670774 -437.053
-437.053 0.016756

We then find the inverse of C
InvC =
1.215D-08 0.000317
0.000317 67.94902

f1 and f2 are the Linear Discriminat Functions
f1 f2
74.81613 72.76803
76.69272 74.62444
62.76609 60.89518
71.22988 73.33025
42.74908 44.76578
54.94263 56.81285


We will use a test image( a 25 centavo coin). Let's pretend that we did not know what it is.
T = [48392 0.7848263]

The Linear Discriminant Functions are
f1T = 43.601981
f2T = 45.554149

From the graph, it shows that the test function is close to the 25 centavos. So I think our prediction is right. :)

Acknowledgments:
Linear Discriminant Analysis Lecture

Grade: 10/10 because I think that my result is right.

 
template by suckmylolly.com