new LDA node

Hi,

I noticed the new LDA node has got a strange behavior for a LDA. For example, usually performing a LDA in Knime I use the R or Python nodes. The results you expect :

LDA works on the learner / predictor mode. You learn a class from numerical variables and you return the predicted class from the LDA with the attribution probabilities for each returned groups as usual. So you should be able for example to use the scorer node with it.

I join a short example of the expected results in attachment.

Best regards,

Fabien

Hi Fabien,
The LDA node currently only does dimensionality reduction, no classification. Think of it as PCA that takes into account the class information. We should maybe change the name of the node to make that clearer…
Regards,
Alexander

Hi Fabien and Alexander,

 

Is there meanwhile a node that makes a real linear discriminant analysis and not only dimensionality reduction? I need a node that also explains what random variables are the most important for the separation of the objects into the individual classes? I think there ist such a module in SPSS, but I would like to do it in KNIME.

Thanks for the answer,

Best regards,


Tanya

Privet Tanya,


You will find in attachment a workflow with R code within Knime using discriminant analysis from R package MASS.


Point on the R learner right clic and R std output to obtain the variables diagnosis.


Best regards


Fabien

Hallo Fabien,

Thanks a lot for your quick answer. This node ist exactly what I need.

I tried to use your R learner node on my data, but unfortunately it does not work. As I am no programmer an I´ve never worked with R, I don´t really understand what I have to do, but is seems like I have to create a new R code, that fits my data. Am I right? Do I need a special knime.model and knime.in, that is written in R? I would appreciate every help.

Thanks again

Best greetings,

 

Tanya

Hi Tanya,

The code in the R learner is the following :

library(MASS)
data <- as.matrix(knime.in)
knime.model <- lda(groupe ~ ., data=knime.in)
print(knime.model)

just replace "groupe" by the alphanumeric column you want to predict

if it still doesn't work can you send me a example of your datas in case  I could see where the problem comes from ?

Fabien

Thx Fabien

 

It seems to work now