hello, I am using LDA and QDA function of MASS library. I understand Fisher LDA is a method non-probabilistic in nature, so I wonder what happens when I try to predict my test set examples as in:> fit <- lda(labels~., data=train.table, prior=c(.5,.5)) > pred <- predict(fit, data=test.table, prior=c(.5,.5))Specifically I ask this because in my problem there are 700 examples class A, and 50 in class B, and I'd be glad to use a way to weight the contribution of the examples in different classes. My guess is that the CODE above estimates the likelihood of of the Fisher scores for (example | class) and then implements the Bayes rule to return the maximum a-posteriori class. Is that correct? Any pointer towards that direction is appreciated. Please cc to edo at stat.cmu.edu your reply. Thanks Edoardo M. Airoldi http://www.stat.cmu.edu/~eairoldi BH 232L (412) 268.7829 PC Lab (412) 268.8719
Edoardo M Airoldi
2003-May-18 22:59 UTC
Follow-up: [R] Fisher LDA and prior=c(...) argument
hello, a clarification. I am using LDA and QDA function of MASS library. I understand Fisher LDA is a method non-probabilistic in nature, so I wonder what happens when I try to predict my test set examples as in:> fit <- lda(labels~., data=train.table, prior=c(.5,.5)) > pred <- predict(fit, data=test.table, prior=c(.5,.5))Specifically I ask this because in my problem there are 700 examples class A, and 50 in class B, and I'd be glad to use a way to weight the contribution of the examples in different classes (in the prediction stage for LDA I guess) My guess is that the CODE above estimates the likelihood of 'the projection of the data onto the canonical variate' (only one with 2 classes) as in: P(example | class=.) and then implements the Bayes rule to return the maximum a-posteriori class, using the estimated likelihood and the given prior=c(...) Is that correct? Any pointer towards the understanding is appreciated. Further any pointer towards an example that uses the argument CV=TRUE is also appreciated, since i was not able (apparently) to get any change by setting it to TRUE =:-) Edoardo M. Airoldi http://www.stat.cmu.edu/~eairoldi BH 232L (412) 268.7829 PC Lab (412) 268.8719