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

From: pdb <>
Date: Sun, 01 May 2011 17:05:10 -0700 (PDT)

Thanks again Max - a great time saver this is.

Now just for my sanity, if I use to build a model where I have the matrices, how do I then use the predict function without getting an error message?

> LOGISTIC_model1 <-,mdrrClass,
> family=binomial(link="logit"))

Warning messages:
1: algorithm did not converge
2: fitted probabilities numerically 0 or 1 occurred
> predict(LOGISTIC_model1)

Error in UseMethod("predict") :
  no applicable method for 'predict' applied to an object of class "c('double', 'numeric')"

Secondly, caret acts as a nice wrapper to protect me from all this, and it does the resampling to give me an idea of the expected model fit. If I was doing a parameter search, would it do all this resampling for each combination of parameters? Now if I just want to build a model and not worry about all the resampling (in my case I just want a set of baseline predictions to compare various variable selections methods against) it would be nice if there was a simple option to turn off the resampling.

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 05 May 2011 - 06:25:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 05 May 2011 - 07:00:06 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive