I want to compute the Roc curve and then the AUC from the linear discriminant model. Do you know how can I do this? here there is the code:
##LDA
require(MASS)
library(MASS)
lda.fit = lda(Negative ~., trainSparse)
lda.fit
plot(lda.fit)
###prediction on the test set
lda.pred=predict(lda.fit,testSparse)
table(testSparse$Negative,lda.pred$class)
I would do it like this. Because here you get AUC measure as well + looks super lean and slick