Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

50

Transcript of Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Page 1: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.
Page 2: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

• Covariance matrices for all of the classes are identical,

• But covariance matrices are arbitrary.

Page 3: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

)(Plnln2

12ln

2

d)x()x(

2

1)x(g ii

1

ii

tii

and are independent of i.

So,

Page 4: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.
Page 5: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.
Page 6: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.
Page 7: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

• Covariance matrices are different for each category.

Page 8: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

)(Plnln2

12ln

2

d)x()x(

2

1)x(g ii

1

ii

tii

only is independent of i.

So,

Page 9: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.
Page 10: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.
Page 11: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.
Page 12: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE:

Page 13: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE (cont.):

Page 14: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE (cont.):

Find the discriminant function for the first class.

Page 15: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE (cont.):

Find the discriminant function for the first class.

Page 16: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE (cont.):

Similarly, find the discriminant function for the second class.

Page 17: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE (cont.):

The decision boundary:

Page 18: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE (cont.):

The decision boundary:

Page 19: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE (cont.):

Using MATLAB we can draw the decision boundary:

(to draw the decision boundary in MATLAB)

>> s = 'x^2-10*x-4*x*y+8*y-1+2*log(2)'; >> ezplot(s)

Page 20: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE (cont.):

Using MATLAB we can draw the decision boundary:

Page 21: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

EXAMPLE (cont.):

Page 22: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Error Probabilities and Integrals

Page 23: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Error Probabilities and Integrals

Page 24: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Error Probabilities and Integrals

Page 25: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

• Another measure of distance between two Gaussian distributions.• found a great use in medicine, radar detection and other fields.

Page 26: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

Page 27: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

Page 28: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

Page 29: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

• If both diagnosis and test are positive, it is called a true positive. The probability of a TP to occur is estimated by counting the true positives in the sample and divide by the sample size.

• If the diagnosis is positive and the test is negative it is called a false negative (FN).

• False positive (FP) and true negative (TN) are defined similarly.

Page 30: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

• The values described are used to calculate different measurements of the quality of the test. •The first one is sensitivity, SE, which is the probability of having a positive test among the patients who have a positive diagnosis.

Page 31: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

• Specificity, SP, is the probability of having a negative test among the patients who have a negative diagnosis.

Page 32: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

• Example:

Page 33: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

• Example (cont.):

Page 34: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Receiver Operating Characteristics

• Overlap in distributions:

Page 35: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features

Assume x = (x1.......xd) takes only m discrete values

Components of x are binary or integer valued, x can take only one of m discrete values

v1, v2, …, vm

Page 36: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Decision Strategy)

Maximize class posterior using bayes decision rule P(1 | x) = P(x | j) . P (j )

P(x | j) . P (j)

Decide i if P(i | x) > P(i | x) for all i ≠ j

or Minimize the overall risk by selecting the

action i = * : deciding 2

* = arg min R(i | x)

Page 37: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem)

Page 38: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem)

Page 39: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem)

Page 40: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem)

Page 41: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem)

Page 42: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem)

Page 43: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem) EXAMPLE

Page 44: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem) EXAMPLE

Page 45: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem) EXAMPLE

Page 46: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem) EXAMPLE

Page 47: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Bayes Decision Theory – Discrete Features (Independent binary features in 2-category problem) EXAMPLE

Page 48: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

APPLICATION EXAMPLEBit – matrix for machine – printed characters

a pixel

Here, each pixel may be taken as a feature

For above problem, we have

is the probabilty that for letter A,B,…

iX

1iX

1001010 d

1

0

ip

iX

AB

Page 49: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

Summary

•To minimize the overall risk, choose the action that minimizes the conditional risk R (α |x).•To minimize the probability of error, choose the class that maximizes the posterior probability P (wj |x).•If there are different penalties for misclassifying patterns from different classes, the posteriors must be weighted according to such penalties before taking action.•Do not forget that these decisions are the optimal ones under the assumption that the “true” values of the probabilities are known.

Page 50: Covariance matrices for all of the classes are identical, But covariance matrices are arbitrary.

References

R.O. Duda, P.E. Hart, and D.G. Stork, Pattern Classification, New York: John Wiley, 2001. Selim Aksoy, Pattern Recognition Course Materials, 2011. M. Narasimha Murty, V. Susheela Devi, Pattern Recognition an Algorithmic Approach,

Springer, 2011. “Bayes Decision Rule Discrete Features”,

http://www.cim.mcgill.ca/~friggi/bayes/decision/binaryfeatures.html, access: 2011.