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

2011-08-28 Thread Max Kuhn
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...@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@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

__
R-help@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.


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

2011-08-28 Thread Jon Toledo

I corrected some of my syntax and changed the the glmStepAIC for glm and ti 
worked. I tried my command lines with the mdrr dataset (after doing the first 
cleaning steps as referred in the manual), the only difference is that I only 
took first two columns because it took too much time with one variable and I 
got the same resutls: undefined columns selected. Here are the command lines:
fitControlAUC - trainControl(method = cv, number = 10, classProbs = TRUE, 
summaryFunction = twoClassSummary, returnResamp = all, verboseIter = FALSE)
glmROCLum1 - train(trainDescr[,(1:4)], trainMDRR, method = glmStepAIC, 
tuneLength = 4, metric = ROC, trControl = fitControlAUC)
So I used glmStepAIC to find the right model and the to obtain the ROC results 
I used the glm method using the variables select by glmStepAIC.
Thank you very much for your package help and interest.
Best regards,

J Toledo


Here is my previous session Info
R version 2.13.0 (2011-04-13)Platform: i386-pc-mingw32/i386 (32-bit)
locale:[1] LC_COLLATE=Spanish_United States.1252  LC_CTYPE=Spanish_United 
States.1252   [3] LC_MONETARY=Spanish_United States.1252 LC_NUMERIC=C   
   [5] LC_TIME=Spanish_United States.1252
attached base packages:[1] splines   tcltk stats graphics  grDevices 
utils datasets  methods   base 
other attached packages: [1] e1071_1.5-26class_7.3-3 caret_4.98  
cluster_1.14.0  reshape_0.8.4   plyr_1.5.2  [7] lattice_0.19-26 Rcmdr_1.6-4 
car_2.0-10  foreign_0.8-44  survival_2.36-9 nnet_7.3-1 [13] 
MASS_7.3-13
loaded via a namespace (and not attached):[1] grid_2.13.0
 Date: Sun, 28 Aug 2011 13:23:24 -0400
 Subject: Re: [R] Trying to extract probabilities in CARET (caret) package 
 with a glmStepAIC model
 From: mxk...@gmail.com
 To: tintin...@hotmail.com
 CC: r-help@r-project.org
 
 Can you provide a reproducible example and the results of
 sessionInfo()? What are the levels of your classes?
 

  
[[alternative HTML version deleted]]

__
R-help@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.


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

2011-08-27 Thread Jon Toledo

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@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.