30
2. Mathematical Preliminaries 2. Mathematical Preliminaries 2. Mathematical Preliminaries

2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

2. Mathematical Preliminaries2. Mathematical Preliminaries2. Mathematical Preliminaries

Page 2: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

2

Mathematical PreliminariesMathematicalMathematical PreliminariesPreliminaries

• Random Variables

• Linear Transformations

• Eigenvalues and Eigenvectors

• Orthonormal Transformations

• Matrix Inversion

Page 3: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

3

Random VariablesRandomRandom VariablesVariables

In statistical pattern recognition, a pattern (input to a PR system) is a d-dimensional feature vector (random variable)

Page 4: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

4

Random VariablesRandomRandom VariablesVariables

Is fully characterized by its (cumulative) distribution function:

or density function:

Page 5: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

5

Random VariablesRandomRandom VariablesVariables

• In pattern recognition, we deal with random vectors drawn from different classes• Conditional density of class i (L classes):

• Unconditional density function of x (mixture density function):

is a priori probability of class i

Page 6: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

6

Random VariablesRandomRandom VariablesVariables

• A posteriori probability of wi given x (Bayes theorem):

Page 7: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

7

Random VariablesRandomRandom VariablesVariables

• Expected vector (mean):

Page 8: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

8

Random VariablesRandomRandom VariablesVariables

• Covariance matrix (indicates the dispersion of the distribution):

is

the variance, is

the standard deviation

of

is

the correlation

coefficient between

and

Page 9: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

9

Random VariablesRandomRandom VariablesVariables

is

the autocorrelation

function

Page 10: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

10

Random VariablesRandomRandom VariablesVariables

Gaussian (normal) distribution: describes data that cluster around a mean or average

1-d

d>=1

distance function

Page 11: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

11

Random VariablesRandomRandom VariablesVariables

Normal distribution:• is uniquely characterized by the expected vector and covariance matrix

• The assumption of normality is a reasonable approximation for many real data sets

• However, normality should not be assumed without good justification

• More about normal distribution

Page 12: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

12

Linear TransformationsLinearLinear TransformationsTransformations

Page 13: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

13

Linear TransformationsLinearLinear TransformationsTransformations

Page 14: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

14

Eigenvalues and EigenvectorsEigenvaluesEigenvalues and and EigenvectorsEigenvectors

-

eigenvectors

-

eigenvalues

Write

for all i:

Page 15: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

15

Eigenvalues and EigenvectorsEigenvaluesEigenvalues and and EigenvectorsEigenvectors

eigenvalue

matrix

eigenvector

matrix

Page 16: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

16

Eigenvalues and EigenvectorsEigenvaluesEigenvalues and and EigenvectorsEigenvectors

The eigenvectors

corresponding

to two different

eigenvalues

are orthogonal:

Page 17: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

17

Eigenvalues and EigenvectorsEigenvaluesEigenvalues and and EigenvectorsEigenvectors

Page 18: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

18

Eigenvalues and EigenvectorsEigenvaluesEigenvalues and and EigenvectorsEigenvectors

There is no correlation in the transformedspace:

Page 19: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

19

Eigenvalues and EigenvectorsEigenvaluesEigenvalues and and EigenvectorsEigenvectorsEigenvectors

are the principal

axis of the distribution

• We

rotate

the coordinate

system

• There is

no correlation

between

y1

and y2

• λ1

gives

the variance of y1

, λ2 gives

the variance of y2

Page 20: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

20

WhiteningWhiteningWhitening

After applying the orthonormal transformation, we can add another transformation that will make the covariance matrix equal to I:

Purpose: to change the scales

of principal components in proportion to

Page 21: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

21

Simultaneous DiagonalizationSimultaneousSimultaneous DiagonalizationDiagonalization

Goal: diagonalize and simultaneously by a linear transformation:

Page 22: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

22

Orthonormal TransformationsOrthonormalOrthonormal TransformationsTransformations

Properties:a) Eigenvalues are invariant

Page 23: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

23

Orthonormal TransformationsOrthonormalOrthonormal TransformationsTransformations

Page 24: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

24

Orthnormal TransformationsOrthnormalOrthnormal TransformationsTransformations

b) Euclidean distance is invariant

Distance in Y-space is the same as inX-space

Page 25: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

25

Trace of Covariance MatrixTrace of Covariance Trace of Covariance MatrixMatrix

Let’s look at

Sum of diagonal terms of

The trace of is the summation of all eigenvalues and is invariant under anyorthonormal transformation

Page 26: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

26

Determinant of Covariance MatrixDeterminantDeterminant of Covariance of Covariance MatrixMatrix

The determinant of is equal to the product of all eigenvalues and is invariant under any orthonormal transformation

Page 27: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

27

Rank of Covariance MatrixRank of Covariance Rank of Covariance MatrixMatrix

Rank of is equal to the number of nonzero eigenvalues

Relation between |S| and :

Page 28: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

28

Matrix InversionMatrixMatrix InversionInversion

Introduction to matrix inversion: 1 and 2

Page 29: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

29

Generalized Inverse (Pseudo Inverse)GeneralizedGeneralized Inverse (Pseudo Inverse)Inverse (Pseudo Inverse)

Page 30: 2. Mathematical Preliminaries · 2009-10-06 · Relation between |S| and : Pattern ... Introduction to matrix inversion: 1 . and . 2. Pattern Recognition: Introduction 29 Generalized

IntroductionPattern Recognition:

30

Generalized Inverse (Pseudo Inverse)GeneralizedGeneralized Inverse (Pseudo Inverse)Inverse (Pseudo Inverse)

However, if matrix is singular someeigenvectors are zero

Generalized (pseudo) inverse:

But: