[R] weird! QDA does not depend on priors?
ligges at statistik.uni-dortmund.de
Sat Mar 11 15:14:04 CET 2006
> Hi all,
> If I run LDA on the same data (2-class classification) with default(no
> priors specified in the lda function) vs. "prior=c(0.5, 0.5)", the results
> are different.
> The (0.5, 0.5) priors give better 1-classify-to-1 rate, and the proportional
> priors(default, no priors specified in the lda function) give better
> 0-classify-to-0 rate, for both training and testing data sets.
> However, if I run QDA on the same data (2-class classification) with
> default(no priors specified in the lda function) vs. "prior=c(0.5, 0.5)",
> the results are the same,
> i.e. the confusion tables are completely the same for two types of priors, I
> even tried "qda" function with "prior=c(0.3, 0.7)" and other values, the
> confusion tables are still the same...
> What might be the problem?
Are we talking about the lda() and qda() implementations in package MASS?
Which versions of R and MASS (?) are we talking about?
Can you specify a reproducible example, please?
The follwing example works for me:
qdaObj <- qda(Species ~ ., data = iris, prior = c(1, 0, 0))
> Thanks a lot!
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help