Faq how do I calculate scores from a PLS or PLSDA model

From Eigenvector Research Documentation Wiki
Revision as of 12:23, 5 December 2018 by imported>Lyle
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


How do I calculate scores from a PLS or PLSDA model?

Possible Solutions:

Because of the unique relationship between weights and loadings in a PLS model, the calculation of scores for new data does not simply involve a projection onto the loadings, as it does with PCR or PCA (i.e., Tnew = XnewP) . Given new data,Xnew, the scores for these new samples are instead calculated using:

 Tnew = XnewW(PTW)-1

where W is the matrix of PLS model weights and P is the matrix of PLS model loadings.

In Matlab notation, this can be done using:

>> scores = x*W*pinv(P'*W)

where x is the new data. Given a standard model structure from PLS_Toolbox named "model" the following defines W and P:

>> P = model.loads{2,1}
>> W = model.wts

Still having problems? Please contact our helpdesk at helpdesk@eigenvector.com