[R] caret - prevent resampling when no parameters to find

pdb philb at philbrierley.com
Mon May 2 03:28:05 CEST 2011


Hi Max,
I tried your suggestion but cam up with errors:

fitControl<-trainControl(number=1)
LOGISTIC_model <- train(mdrrDescr,mdrrClass
                        ,method='glm'
                        ,trControl = fitControl
                        )

Fitting: parameter=none 
Error in if (all.equal(sort(x$index[[1]]), seq(along = x$data$.outcome)))
x$data else x$data[-x$index[[i]],  : 
  argument is not interpretable as logical

                        
fitControl<-trainControl(seq(along = mdrrClass))                       
LOGISTIC_model <- train(mdrrDescr,mdrrClass
                        ,method='glm'
                        ,trControl = fitControl
                        ) 


Error in switch(tolower(trControl$method), oob = NULL, cv = createFolds(y, 
: 
  EXPR must be a length 1 vector
In addition: Warning message:
In if (trControl$method == "oob" & !(method %in% c("rf", "treebag",  :
  the condition has length > 1 and only the first element will be used--
View this message in context: http://r.789695.n4.nabble.com/caret-prevent-resampling-when-no-parameters-to-find-tp3488761p3489091.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list