Using results from plsregress to determine unknowns

Hey everyone,
I have a data set of Raman spectra that I have used PLSregress to perform a calibration. My calibrants are an 18x2351 X-matrix of Raman spectra and a 18x2 Y-matrix of known concentrations for 2 compounds. Using plsregress I can get a beta matrix (2352x2), BUT I don't understand how to use this beta matrix to predict the concentration of an unknown sample. I have 5 samples I want to validate the model with, but I can't figure out what to do next! (Note: my linear algebra is a little weak)
Thanks!
Colin

 Accepted Answer

You can just add a bias column (column of ones) to your X_validate matrix and multiply with beta. Sample code can be as follows
Y_validate = [ones(5,1),X_validate]*beta;
The result matrix Y_validate will be of dimension 5X2.
I hope this answer will help to solve your problem.
Thanks and regards
Darshan Bhat

More Answers (0)

Community Treasure Hunt

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

Start Hunting!