200 likes | 294 Views
>> [ 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 % Variance Component of Captured Captured Number Cov (X) This PC Total
E N D
>> [ax,mx,stdx]=auto(x); >> [scores,loads,ssq,res,reslm,tsqlm,tsq] = pca(ax,1,0,5); PercentVarianceCapturedby PCA Model Principal Eigenvalue % Variance % Variance Component of CapturedCaptured NumberCov(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
>> plot(loads(:,2)) >> hline(0) >> text([1:20]',loads(:,2),namevarall);
>> plot(scores(:,2)) >> hline(0) >> text([1:22]',scores(:,2),lakenames(:,1:5));
>> plot(loads(:,1),loads(:,2),'+r') >> hline(0) >> vline(0) >> text(loads(:,1),loads(:,2),namevarall);
>> plot(scores(:,1),scores(:,2),'ob') >> hline(0) >> vline(0) >> text(scores(:,1),scores(:,2),lakenames(:,1:5));
>> 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)); >> hold Currentplotheld >> plot(loads(:,1),loads(:,2),'+r') >> text(loads(:,1),loads(:,2),namevarall);
Modelo de correlación entre HCB y variables/parámetros no-químicos >> [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 para 1 comp. PLS >> plot(b(1,:)') >> hline(0) >> text([1:8]',b(1,:)',namevarpar)
>> plot(w(:,1)) >> hline(0) >> text([1:8]',w(:,1),namevarpar)
vip_scores1 = vipr(t(:,1),p(:,1),w(:,1),b(1,:)',1,8,namevarpar);
>> plot(b(2,:)') >> hline(0) >> text([1:8]',b(2,:)',namevarpar)
>> plot(w(:,2)) >> hline(0) >> text([1:8]',w(:,2),namevarpar)
vip_scores2 = vipr(t(:,2),p(:,2),w(:,2),b(2,:)',1,8,namevarpar);
>> plot(b(3,:)') >> hline(0) >> text([1:8]',b(3,:)',namevarpar)
>> plot(w(:,3)) >> hline(0) >> text([1:8]',w(:,3),namevarpar)
vip_scores3 = vipr(t(:,3),p(:,3),w(:,3),b(3,:)',1,8,namevarpar);