>> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5);...

20
0 5 10 15 20 0 500 1000 1500 2000 2500 3000 0 5 10 15 20 0 500 1000 1500 2000 2500 3000 0 5 10 15 20 -2 0 2 4 6 0 5 10 15 20 -2 0 2 4 6

Upload: edwina-watson

Post on 16-Dec-2015

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

0 5 10 15 200

500

1000

1500

2000

2500

3000

0 5 10 15 200

500

1000

1500

2000

2500

3000

0 5 10 15 20-2

0

2

4

6

0 5 10 15 20-2

0

2

4

6

Page 2: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

>> [ax,mx,stdx]=auto(x);>> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance % VarianceComponent of Captured Captured Number Cov(X) This PC Total--------- ---------- ---------- ---------- 1 9.29e+00 46.44 46.44 2 2.55e+00 12.75 59.18 3 1.85e+00 9.24 68.42 4 1.48e+00 7.41 75.83 5 1.34e+00 6.70 82.53 6 1.14e+00 5.70 88.23 7 8.57e-01 4.29 92.52 8 5.06e-01 2.53 95.05 9 3.99e-01 2.00 97.04 10 1.78e-01 0.89 97.93

Page 3: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

0 2 4 6 8 10 12 14 16 18 20-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

lipid

Weight

Length

Age

Height

Temp

Lati

Long

HCB

aHCH gHCH

dde ddt

pcb28

pcb52

pcb101pcb118

pcb138pcb153pcb180

Page 4: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

0 5 10 15 20 25-10

-8

-6

-4

-2

0

2

4

Øvre

FallbNedre

Øvre Stavs

LochnMaan

ZieloVel’k

GosseRotfe

OberdSchwa

Lungo

JörisPaion

Aubé

Redo

OkotoBlizn

CimerEscur

Page 5: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

0 2 4 6 8 10 12 14 16 18 20-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

lipid Weight

Length

Age Height

Temp Lati

Long

HCB

aHCH gHCH

dde ddt

pcb28 pcb52

pcb101

pcb118

pcb138pcb153pcb180

>> plot(loads(:,2))>> hline(0)>> text([1:20]',loads(:,2),namevarall);

Page 6: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

0 5 10 15 20 25-3

-2

-1

0

1

2

3

4

5

Øvre Fallb

Nedre

Øvre

Stavs

Lochn

Maan

Zielo

Vel’k

Gosse

Rotfe

OberdSchwa

Lungo

Jöris

Paion

Aubé

Redo

Okoto

Blizn

Cimer

Escur

>> plot(scores(:,2))>> hline(0)>> text([1:22]',scores(:,2),lakenames(:,1:5));

Page 7: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

-0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

lipid Weight

Length

Age Height

Temp Lati

Long

HCB

aHCH gHCH

dde ddt

pcb28 pcb52

pcb101

pcb118

pcb138pcb153pcb180

>> plot(loads(:,1),loads(:,2),'+r')>> hline(0)>> vline(0)>> text(loads(:,1),loads(:,2),namevarall);

Page 8: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

-10 -8 -6 -4 -2 0 2 4-3

-2

-1

0

1

2

3

4

5

Øvre Fallb

Nedre

Øvre

Stavs

Lochn

Maan

Zielo

Vel’k

Gosse

Rotfe

OberdSchwa

Lungo

Jöris

Paion

Aubé

Redo

Okoto

Blizn

Cimer

Escur

>> plot(scores(:,1),scores(:,2),'ob')>> hline(0)>> vline(0)>> text(scores(:,1),scores(:,2),lakenames(:,1:5));

Page 9: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

-0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Øvre Fallb

Nedre

Øvre

Stavs

Lochn

Maan

Zielo

Vel’k

GosseRotfe

OberdSchwa

Lungo

Jöris

Paion

Aubé

Redo

Okoto

Blizn

Cimer

Escur

lipid Weight

Length

Age Height

Temp Lati

Long

HCB

aHCH gHCH

dde ddt

pcb28 pcb52

pcb101

pcb118

pcb138pcb153pcb180

>> nscores(:,1)=scores(:,1)/norm(scores(:,1));>> nscores(:,2)=scores(:,2)/norm(scores(:,2));>> plot(nscores(:,1),nscores(:,2),'ob')>> hline(0)>> vline(0)>> text(nscores(:,1),nscores(:,2),lakenames(:,1:5));>> holdCurrent plot held>> plot(loads(:,1),loads(:,2),'+r')>> text(loads(:,1),loads(:,2),namevarall);

Page 10: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

>> [b,ssq,p,q,w,t,u,bin] = pls(axv,ay,5,1); Percent Variance Captured by PLS Model -----X-Block----- -----Y-Block----- LV # This LV Total This LV Total ---- ------- ------- ------- ------- 1 30.36 30.36 57.63 57.63 2 21.06 51.41 17.24 74.88 3 10.63 62.05 7.68 82.56 4 14.61 76.66 1.11 83.67 5 9.87 86.52 0.58 84.25

Modelo de correlación entre HCB y variables/parámetros no-químicos

Page 11: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 8-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

lipid

Weight

Length

Age

Height

Temp

Lati

Long

Modelo para 1 comp. PLS>> plot(b(1,:)')>> hline(0)>> text([1:8]',b(1,:)',namevarpar)

Page 12: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 8-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

lipid

Weight

Length

Age

Height

Temp

Lati

Long

>> plot(w(:,1))>> hline(0)>> text([1:8]',w(:,1),namevarpar)

Page 13: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 80

1

2

3

4

5

6

lipid

WeightLength

Age

HeightTemp

Lati Long

vip_scores1 = vipr(t(:,1),p(:,1),w(:,1),b(1,:)',1,8,namevarpar);

Page 14: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 8-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

lipid

Weight

Length

Age

Height

Temp

Lati

Long

>> plot(b(2,:)')>> hline(0)>> text([1:8]',b(2,:)',namevarpar)

Page 15: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 8-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6 lipid

Weight

Length

Age

Height

Temp

Lati

Long

>> plot(w(:,2))>> hline(0)>> text([1:8]',w(:,2),namevarpar)

Page 16: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 80

0.5

1

1.5

2

2.5

lipid

Weight

Length

Age

Height

Temp

Lati

Long

vip_scores2 = vipr(t(:,2),p(:,2),w(:,2),b(2,:)',1,8,namevarpar);

Page 17: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 8-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

lipid

WeightLength

Age

Height

Temp

Lati

Long

>> plot(b(3,:)')>> hline(0)>> text([1:8]',b(3,:)',namevarpar)

Page 18: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 8-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

lipid

Weight

Length

Age

Height

Temp

Lati

Long

>> plot(w(:,3))>> hline(0)>> text([1:8]',w(:,3),namevarpar)

Page 19: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 80

0.5

1

1.5

2

2.5

3

lipid

Weight

Length

Age

Height

Temp

Lati

Long

vip_scores3 = vipr(t(:,3),p(:,3),w(:,3),b(3,:)',1,8,namevarpar);

Page 20: >> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); Percent Variance Captured by PCA Model Principal Eigenvalue % Variance

1 2 3 4 5 6 7 80.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7

0.75

0.8

0.85

Latent Variable

RM

SE

CV

(o)

, R

MS

EC

(s)

CV for PLS via SIMPLS, leave-one-out.