Partial least-squares regression evalutaion

12 ビュー (過去 30 日間)
SM
SM 2020 年 2 月 6 日
編集済み: Vladimir Sovkov 2020 年 2 月 7 日
Hi
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?
Thanks

採用された回答

Vladimir Sovkov
Vladimir Sovkov 2020 年 2 月 6 日
編集済み: Vladimir Sovkov 2020 年 2 月 6 日
The equation considered in PLS of Matlab is rather
Y = X(:,:)*B(2:end,:) + repmat( B(1,:),n,1 ) + E,
where:
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).
Matlab command:
[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.
  2 件のコメント
SM
SM 2020 年 2 月 6 日
Thank you for your detailed answer.
I am still confused in the names and match it with the Matlab code:
(1) Y=XB+E , that you mentioned E is not needed and beta or B is equal to B in the equation (1).
(2) T=WX
(3) Y=TQ+E
1-I am wondering that what exactly are XL and YL and XS and YS?
2- Regarding the prediction is it: Y_new=X_new*B(2:end,:) + repmat( B(1,:),n,1 ) ?
Thanks
Vladimir Sovkov
Vladimir Sovkov 2020 年 2 月 7 日
編集済み: Vladimir Sovkov 2020 年 2 月 7 日
(1)
Matlab documentation states that XL = (XS\X0)' = X0'*XS, YL = (XS\Y0)' = Y0'*XS
where X0 and Y0 are the centered versions of X and Y : X0 = X - mean(X,1); Y0 = Y - mean(Y,1).
Hence, approximately (i.e., via separating out some noisy components): X0 ~= XS*XL', Y0 ~= XS*YL'
The last equation looks similar to your Y=TQ+E with T=XS, Q=YL' and Y -> Y0.
Factually, Y ~= XS*YL' + mean(Y,1)
(2)
Yes, Y_new=X_new*B(2:end,:) + repmat( B(1,:),n,1 ) = [ones(n,1),X_new]*B

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParticle & Nuclear Physics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by