[R] PLS LDA
Liaw, Andy
andy_liaw at merck.com
Wed Sep 10 21:50:42 CEST 2003
Do you mean the pls.pcr package by Prof. Wehrens? This is what I do:
o Code the two groups as 0s and 1s (numeric, not factor).
o Run PLS as usual. Cases with predicted values > 0.5 get
classified as 1s, otherwise as 0s.
o Note that you need to modify the code inside the mvr()
function a bit if you want to use the built-in selection
of number of LVs: It selects the number that gives the
best MSE, but what you really want is the number that
gives the best error rate. One trick is to discretize
the predictions in {0, 1}, then the "MSE" will be error
rate.
There are better ways to do this, but this works fairly well.
HTH,
Andy
> -----Original Message-----
> From: Christoph Lehmann [mailto:christoph.lehmann at gmx.ch]
> Sent: Wednesday, September 10, 2003 1:38 PM
> To: R-help at stat.math.ethz.ch
> Subject: [R] PLS LDA
>
>
> Dear R experts
> I saw and downloaded the fresh pls package for R. Is there
> any way of using this pls package for PLS discriminant
> analysis? If not, is there any other package available.
>
> I need a way of classifying objects into e.g. two groups,
> where nbr_observations << nbr_variables
>
> many thanks for your kind help
>
> Christoph
> --
> Christoph Lehmann <christoph.lehmann at gmx.ch>
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo> /r-help
>
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments,...{{dropped}}
More information about the R-help
mailing list