[R] Trying to extract probabilities in CARET (caret) package with a glmStepAIC model

Max Kuhn mxkuhn at gmail.com
Sun Aug 28 19:23:24 CEST 2011


Can you provide a reproducible example and the results of
sessionInfo()? What are the levels of your classes?

On Sat, Aug 27, 2011 at 10:43 PM, Jon Toledo <tintin_jb at hotmail.com> wrote:
>
> Dear developers,
> I have jutst started working with caret and all the nice features it offers. But I just encountered a problem:
> I am working with a dataset that include 4 predictor variables in Descr and a two-category outcome in Categ (codified as a factor).
> Everything was working fine I got the results, confussion matrix etc.
> BUT for obtaining the AUC and predicted probabilities I had to add " classProbs = TRUE," in the trainControl. Thereafter everytime I run train I get this message:
> "undefined columns selected"
>
> I copy the syntax:
> fitControl <- trainControl(method = "cv", number = 10, classProbs = TRUE,returnResamp = "all", verboseIter = FALSE)
> glmFit <- train(Descr, Categ, method = "glmStepAIC",tuneLength = 4,trControl = fitControl)
> Thank you.
> Best regards,
>
> Jon Toledo, MD
>
> Postdoctoral fellow
> University of Pennsylvania School of Medicine
> Center for Neurodegenerative Disease Research
> 3600 Spruce Street
> 3rd Floor Maloney Building
> Philadelphia, Pa 19104
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 

Max



More information about the R-help mailing list