• 검색 결과가 없습니다.

• Tutorial 2: spectral example 

N/A
N/A
Protected

Academic year: 2022

Share "• Tutorial 2: spectral example "

Copied!
26
0
0

로드 중.... (전체 텍스트 보기)

전체 글

(1)

Tutorial 2

• Tutorial 2: spectral example 

(tablet‐spectra.csv)

• 460 observations (tablets), NIR absorbance measured at  650 different wavelengths.

i.e., X : (460x650)

유준, Copyright © 26

(2)

Tutorial 2

• Matrix residuals

유준, Copyright © 27

(3)

Tutorial 2

• Column residuals (from last lecture)

유준, Copyright © 28

(4)

Tutorial 2; Column residuals

• Spectral example

유준, Copyright © 29

?

(5)

Hotelling’s T

2

• Hotelling’s T

2

유준, Copyright © 30

(6)

Tutorial 2: Hotelling’s T

2

• Spectral example

유준, Copyright © 31

(7)

Tutorial 2: Hotelling’s T

2

유준, Copyright © 32

(8)

NIPALS algorithm

• Non‐linear iterative partial least squares (NIPALS)  algorithm

유준, Copyright © 33

ta

(9)

NIPALS algorithm

유준, Copyright © 34

(10)

NIPALS algorithm

유준, Copyright © 35

(continues)

(11)

NIPALS algorithm

유준, Copyright © 36

(12)

NIPALS algorithm

유준, Copyright © 37

(continues)

(13)

NIPALS algorithm

유준, Copyright © 38

(14)

Cross‐validation

• Cross‐validation

• A general tool for avoiding over‐fitting

• Can be applied to any model

유준, Copyright © 39

# of parameters in the model

error

prediction

Modeling (training)

(15)

Cross‐validation

1. Rows of data (X) divided into G groups

2. PCA model estimated for data minus one group

3. Calculate residual Eg,CV for deleted group using the PCA  model

4. Repeat 2 ~ 3 and get EG,CV

※PRESS (prediction error sum of squares), SSX (sum of squares of X)

• R2: how well training data explained by the model

• Q2: how well test data explained by the model

유준, Copyright © 40

2 var( , )

1 1

var( )

G CV PRESS

Q     SS

X

E X

(16)

Cross‐validation

• How many components are necessary?

유준, Copyright © 41

(17)

Cross‐validation

• True number of principal components?

• No one knows.

• Recommendation

Use cross‐validation as guide, and always look at a few extra  components and step back a few components

then make a judgement that is relevant to your intended use of  the model.

• Models where we intend to learn from, or optimize, or  monitor a process may well benefit from fewer or more  components than suggested by cross‐validation.

유준, Copyright © 42

(18)

Tutorial 3

• Food data 

(Foods.csv)

• Food consumption data from 16 EU contries

• % households consuming different types of foods

• Objectives: find any similarities / differences among  countries using ProMV

유준, Copyright © 43

(19)

Tutorial 3

• Food data

• % households consuming different types of foods

유준, Copyright © 44

(20)

Tutorial 3

• Food data

유준, Copyright © 45

(21)

Tutorial 3

• In ProMV,

유준, Copyright © 46

(22)

Some properties of PCA models

The model is defined by the loadings vectors, p1, p2, ... , pA;  each are a (K×1) vector, and can be collected into a single  matrix, P, a (K×A) loadings matrix.

• These vectors form a line for one component, a plane for 2  components, and a hyperplane for 3 or more components. 

This line, plane or hyperplane define the latent variable model.

• An equivalent interpretation of the model plane is that these  direction vectors are oriented in such a way that the scores  have maximal variance for that component. No other 

directions of the loading vector (i.e. no other hyperplane) will  give a greater variance.

유준, Copyright © 47

(23)

Some properties of PCA models

This plane is calculated with respect to a given data set, X, an  (N×K) matrix, so that the direction vectors best‐fit the data. 

We can say then that with one component, the best estimate  of the original matrix X is:

• If we fit a second component:

유준, Copyright © 48

1 1 1 1 1 1

ˆ T or equivalently T

X t p X t p E

2 2 2 1 1 2 1 2

ˆ T or equivalently T T

X t p X t p t p E

T T

(24)

Some properties of PCA models

• The loadings vectors are of unit length: 

• The loading vectors are orthogonal to one another: 

The variance of the t1 vector must be greater than the  variance of the t2 vector, and so on.

Each loading direction, pa, must point in the direction that  best explains the data; but this direction is not unique, since 

−pa also meets this criterion. If we did select −pa as the 

direc on, then the scores would just be −ta instead. This does  not matter too much, because 

유준, Copyright © 49

a 1.0 p

i j

p p

   

T T

a a   a a

t p t p

(25)

Readings

• History

K. Pearson, "On Lines and Planes of Closest Fit to Systems of Points in  Space,” Philosophical Magazine, 2(6), 559–572. (1901)

H. Hotelling,"Analysis of a Complex of Statistical Variables with 

Principal Components,”  Journal of Educational Psychology, 24, 417‐

441, 498‐520, (1933)

Papers by K. Karhunen, (1947) in Russian & M. Loeve, (1948) in French

• NIPALS algorithm

H. Wold, “Estimation of principal components and related models by  iterative least squares,” in Multivariate Analysis (Ed., Krishnaiah, P. R.),  Academic Press, NY, pp. 391‐420 (1966).

• Cross‐validation

S. Wold, “Cross‐validatory estimation of the number of components in  factor and principal components models,” Technometrics, 20, 397‐405,  (1978).

유준, Copyright © 50

(26)

Readings

• General

S. Wold, K. Esbensen, and P. Geladi, “Principal Component Analysis,” 

Chemometrics and Intelligent Laboratory Systems, 2, 37‐52, (1987).

T. Kourti and J. MacGregor, “Process analysis, monitoring and diagnosis  using multivariate projection methods – a tutorial, Chemometrics and  Intelligent Laboratory Systems, 28, 3‐21, (1995).

J. MacGregor, H. Yu, S. García‐Muñoz, and J. Flores‐Cerrillo, “Data‐

Based Latent Variable Methods for Process Analysis, Monitoring and  Control”. Computers and Chemical Engineering, 29, 1217‐1223, (2005).

유준, Copyright © 51

참조

관련 문서

• Using the method of superposition, the separate M/EI diagrams for the redundant reaction B y and the load P are shown in Fig...

Arabic Scripted Language Identification System in order to identify the language of the Arabic script by using PCA and KNN, here, the number of PCA features were optimized

In this study, therefore, the method for measuring residual stresses using ESPI technique that is one of the laser applied measurement technique excellent in the view

à For each subentity, create a table that includes the attributes of that entity set plus the primary key of the higher level

 For an ideal column (no eccentricity or residual stress) buckling will occur at the tangent modulus load, given by.. ( E t

Under those demands, we need to develope the new service model for future collaborative u-Government extending the governmental working process, group

For a hingeless uniform rotating blade, calculate approximately the fundamental flap bending frequency using the Galerkin method...

Calculate the magnitudes of the shear force, bending moment, and torsional moment acting g g on a transverse section through the frame at point O, located at some distance