have I calculated 'scores' correctly for ROC curve input from PLS-DA

4 views (last 30 days)
HI
i've used plsregress() on some FTIR chemical spectrum data, to get a model which predicts a categorical variable (but because this is a regression, i've set these to '0' and '1')
I want to test the model using an ROC curve, using the function perfcurve()
in the matlab example, the input 'scores' is from a logistic regression model scores = mdl.Fitted.Probability;
which I believe is the probability that the model gets in right in relation to the label
But how do you work out scores = mdl.Fitted.Probability; from the plsregress() function?
plsregress() does give YS, which are scores, but i'm not a mathematician, and these do not appear to be 'probabilities' in the sense that perfcurve() will take as an input
i've calculated the 'scores' another way:
yfitPLS = [ones(52,1) amidenormMaster1(:, 1:400)]*beta;
plot(group2wtTG, yfitPLS, 'x')
which gives the graph attached
and from this I have calculated how different the model result is from the label (e.g. 1 [or 0] - 'the model result' ) and used an absolute number to get rid of negative values - but this feels wrong
what should I be doing?
EDIT: yes i'm sure how i'm calculating scores is completely wrong -
I guess another way of asking this questions is: which column of YS do I use as the 'scores', if I have fitted with 8 components (is it the 8th column?)
thanks
Charlie

Answers (0)

Community Treasure Hunt

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

Start Hunting!