Docsity

Chemometric PCA -I , Lecture Notes- Physics, Study notes of Advanced Physics

Toggle sidebar
bg1
Principal Component
Analysis
Principal Component Analysis
Factor analysis dates back to 1930s.
It was originally used in psychology to study
intelligence. Attempts were made to relate
test results to other factors.
Premise was that X = S L + E where !
X = test performance
L = intrinsic intelligence factors
S = individual scoree
E = residual error
Principal Component Analysis
Using an eigenvector rotation, it would be
possible to decompose the X matrix into a
series of loadings and scores.
Underlying or intrinsic factors related to
intelligence could then be detected.
In chemistry, this approach can be used by
diagonalizating the correlation or
covariance matrix - Principal Component
Analysis.
Principal Component Analysis
PCA is typically conducted using the
covariance matrix from autoscaled data.
!
It is then diagonalized - eigenvector rotation
Typically, the largest eigenvectors (based on
the size of the eigenvalues) are the most
important.
Covariance matrix =NV -1
1l
XTl
X
Covariance and Correlation
Covariance
•A measure of the association of two variables.
•The sum of cross products between two
variables as deviations from their respective
means.
Correlation
•The covariance between two z-
transformed variables (autoscaled).
r=Sx*Sy
COVAR
Principal Component Analysis
Approaches fall into two categories
Complete diagonalization of the matrix.
Approximation methods that extract one
component at a time.
In the end, the results are the same. The data is
decomposed into a set of loadings, scores and a
residual.
++ . . . + +=
m
n
m
nnnn
m
mm
pʼa
pʼ2
pʼ1
t1t2ta
EX
pf3
pf4
pf5

Partial preview of the text

Download Chemometric PCA -I , Lecture Notes- Physics and more Study notes Advanced Physics in PDF only on Docsity!

Principal Component

Analysis

Principal Component Analysis

Factor analysis dates back to 1930s.

It was originally used in psychology to study

intelligence. Attempts were made to relate

test results to other factors.

Premise was that X = S L + E where!

X = test performance

L = intrinsic intelligence factors

S = individual scoree

E = residual error

Principal Component Analysis

Using an eigenvector rotation, it would be

possible to decompose the X matrix into a

series of loadings and scores.

Underlying or intrinsic factors related to

intelligence could then be detected.

In chemistry, this approach can be used by

diagonalizating the correlation or

covariance matrix - Principal Component

Analysis.

Principal Component Analysis

PCA is typically conducted using the

covariance matrix from autoscaled data.

!

It is then diagonalized - eigenvector rotation

Typically, the largest eigenvectors (based on

the size of the eigenvalues) are the most

important.

Covariance matrix =

NV - 1

l

X

T

l

X

Covariance and Correlation

Covariance

• A measure of the association of two variables.

• The sum of cross products between two

variables as deviations from their respective

means.

Correlation

• The covariance between two z-

transformed variables (autoscaled).

COVAR = x - x

^ h

_y - yi

r =

S x * S y

COVAR

Principal Component Analysis

Approaches fall into two categories

Complete diagonalization of the matrix.

Approximation methods that extract one

component at a time.

In the end, the results are the same. The data is

decomposed into a set of loadings, scores and a

residual.

= + +... + +

m

n

m

n n n n

m

m m

pʼ

a

pʼ

2

pʼ

1

t

1

t

2

t

a

X E

EV

EV

Variable

1

Variable

2

Variable

3

Principal component (PC).

A linear combination of related

variables. It represents an intrinsic

factor of your data.

Scores.

The projection of your data in to PC

space.

Loading.

Show the relative significance of the

original variables.

Residual.

The data that could not be correlated

-- typically random noise.

Varimax rotation

A secondary tweaking of the PCs to help

better observe relationships.

It is essentially a secondary rotation of your

data in an attempt to lump all variance from

individual variables in to single components.

It can often help you to better understand

the effects of your original data.

Varimax rotation

1

2

3

4

5

original

variables

% variance % variance % variance

PC1 PC PC

Assume we have 5 original variables and are

only interested in the first 3 PC.

Varimax rotation

After varimax rotation, it might look like:

% variance % variance % variance

1

2

3

4

5

original

variables

PC PC2 PC

The significance of each

variable is easier to see.

Using PCA results

The best way to appreciate PCA is to look at

a series of examples.

We’ll attempt to show what types of

information can be obtained and how it can

be used.

Examples

Classification of artifacts

Classification of whiskey

Noise reduction of 3D data

PCA of archaeological artifacts

The information presented in this

example is from:

!

Kowalski, Schatzki and Stross, Anal.

Chem. 44, 2176 (1972).

A complete evaluation of the data is

also presented in Chemometrics by

Sharaf, Illman and Kowalski, John Wiley

& Sons, 1986.

PCA of archaeological artifacts L1 vs. L

The loadings show

that Ca and Fe both

have an effect on PC1.

The other variables

have a smaller effect.

0. 022 0. 810

Ca

Ti

Fe

Sr

Rb

K

Zr

Mn

Ba

Y

Zr

Y

Sr

Rb

Mn

K

Ca

Ba

Ti

Fe

Correlation plot

XLStat will also

produce a plot that

indicates the

correlation between

the original variables

and the factors.

Here, it indicates

that Y has little effect

and the other have

impact on both PCs.

Archaeological artifacts - Autoscaling

PCA of archaeological artifacts

F1 F2 F3 F4 F5 F6 F7 F8 F9 F

Eigenvalue

Cumulative variability (%)

Now that each variable

is given equal weight,

variance is no longer all

‘smashed’ into the 1st

component.

Zr

Y

Sr

Rb

Mn

K

Ca

Ba

Ti

Fe

F1 (52.52 %)

F2 (20.78 %)

PC Biplot showing scores and loadings

1

vs. PC

2

PCA of archaeological artifacts

So what does it all mean?

In this case, both scaled and unscaled results

indicate a grouping of related samples - XRF

results can be used to classify related samples.

Samples from different quarries (1-4) can

easily be determined although samples from

site 2 are pretty scattered.

Can we tell anything about the artifacts?

No artifacts

appear to

have come

from quarry

site 4.

Itʼs well

resolved

from the

other

samples.

Zr

Y

Sr

Rb

Mn

K

Ca

Ba

Ti

Fe

F1 (52.52 %)

F2 (20.78 %)

Archaeological artifacts - Results

Zr

Y

Sr

Rb

Mn

K

Ca

Ba

Ti

Fe

F1 (52.52 %)

F2 (20.78 %)

Artifacts from site 6

appear to come from

quarry 2, although the

results are scattered.

Artifacts from site 7

are from quarry 3.

Site 5 artifacts appear

to come from all over

the place. Itʼs

possible that this was

a nomadic tribe.

Using the loadings

The loadings indicate that many of our

variables are closely related.

  • In addition,V appears to have little effect on

our results.

We can reprocess our data after eliminating

V and some of our correlated variables.

This might improve our results.

At a minimum it will make subsequent

studies easier - less data to collect.

Using the loadings

Zr

Y

Sr

Rb

Mn

K

Ca

Ba

Ti

Fe

Use K

Use Ca

Use K

Use Fe

Use

Remove

Modified Study

We now only 4 variables.

Is it enough to still give the same

characterization as with the original 10?

If this works, we’ll be able to save quite a

bit of time and money on subsequent

assays.

Also, does it improve our results?

Zr

K

Ca

Fe

F1 (60.47 %)

F2 (27.66 %)

PC

1

vs. PC

2

Our results are almost identical

to our 10 variable work.

Blending of one scotch into another

**- 1

  • 3** - 3 - 1 1 3

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

75 Y

50 Y

25 Y

PC

PC

% of brand Y in

the blend.

Contamination

ppm methybenzoate

vs. PC

- 2

ppm

PC

Dilution

**- 1

  • 3** - 7 - 3 1 5

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

PC

PC

% by V, whiskey