Rinverse: Difference between revisions
Jump to navigation
Jump to search
imported>Chuck No edit summary |
imported>Chuck No edit summary |
||
Line 16: | Line 16: | ||
====Input Cases==== | ====Input Cases==== | ||
* For PLS and PCR model structures, the inputs are the model <tt>mod</tt> | * For PLS and PCR model structures, the inputs are the model <tt>mod</tt> and the optional number of factors <tt>ncomp</tt>. | ||
:rinv = rinverse(mod,ncomp); | :rinv = rinverse(mod,ncomp); |
Latest revision as of 10:24, 9 October 2008
Purpose
Calculates pseudo inverse for PLS, PCR and RR models.
Synopsis
- rinv = rinverse(mod,ncomp) % for PLS or PCR model structures
- rinv = rinverse(p,t,w,ncomp) % for PLS
- rinv = rinverse(p,t,ncomp) % for PCR
- rinv = rinverse(sx,theta) % for RR
Description
This function calculates the pseudo-inverse of a PLS, PCR or Ridge Regression (RR) model, using either a standard model structure, or a series of model parameter arrays. There are four different input cases, depending on the type of model, and whether a standard model structure exists:
Input Cases
- For PLS and PCR model structures, the inputs are the model mod and the optional number of factors ncomp.
- rinv = rinverse(mod,ncomp);
- For PLS models, the inputs are the loadings p, scores t, weights w and number of LVs ncomp.
- rinv = rinverse(p,t,w,ncomp);
- For PCR models, the inputs are the loadings p, scores t, and number of PCs ncomp.
- rinv = rinverse(p,t,ncomp);
- For ridge regression (RR) models, the inputs are the scaled x matrix sx and ridge parameter theta.
- rinv = rinverse(sx,theta).
Outputs
- rinv = pseudo-inverse of model