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

From: pdb <philb_at_philbrierley.com>
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 glm.fit to build a model where I have the matrices, how do I then use the predict function without getting an error message?

> LOGISTIC_model1 <- glm.fit(mdrrDescr,mdrrClass,
> family=binomial(link="logit"))

Warning messages:
1: glm.fit: algorithm did not converge
2: glm.fit: 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: http://r.789695.n4.nabble.com/caret-prevent-resampling-when-no-parameters-to-find-tp3488761p3489020.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive