Partial least-squares regression evalutaion
28 views (last 30 days)
I am new to PLSR and I went throguh several literature that indicate the eqution of Y=BX+E as the PLSR eqution.
I am trying to use :[XL,YL,XS,YS] = plsregress(X,Y,ncomp) but I cannot match the output with the general form of eqution.
From the matlab description I could figure out the B=XL and I guess that YL should be a coefficient for Y, but I am not sure about neither YL nor XS,YS.
Can anyone help me with explaning how to match them?
and also how can I use them to predict other values?
Vladimir Sovkov on 6 Feb 2020
Edited: Vladimir Sovkov on 6 Feb 2020
The equation considered in PLS of Matlab is rather
Y = X(:,:)*B(2:end,:) + repmat( B(1,:),n,1 ) + E,
X is an n-by-p matrix of predictor variables: in analitical chemistry this can be experimentlal data (e.g., spectroscopic measurements), every row of which contains the full set of measurements dealing with one "standard sample"; p measurements (predictors) for each of n samples;
Y is an n-by-m response matrix (sometimes called "scores"), every row of which contains known values of responces (e.g. concentrations of some elements) in the corresponding "standard sample"; m "concentrations" (responces) for each of n samples;
B is the (p+1)-by-m matrix of coefficients ("loadings") to compute scores ("concentrations") from predictors ("spectra"); its 1st row presents intercepts.
E is unknown noise (is not used further on at all, introduced by some authors for a better undestanding of physics).
[XL,YL,XS,YS,B,PCTVAR,MSE] = plsregress(X,Y,ncomp)
For predicting "concentrations" from new "spectroscopic data", only B is needed.
To understand other output, you should get deeper into the theory of PLS, which is hard to explain in a few words.
Many of those outputs serve the purpose of finding the appropriate number ncomp of components, but you can just estimate the quality of the approximation with different ncomp directly via the initial equation.
When you already understand the PLS method, you can address the Matlab documentation to deciper their designations; it also contains an example, which is able to make the things clearer.