[R] Cross validation in R

2013-07-02 Thread Eddie Smith
Guys, I select 70% of my data and keep 30% of it for model validation. mydata - read.csv(file.choose(), header=TRUE) select - sample(nrow(mydata), nrow(mydata) * .7) data70 - mydata[select,] # select data30 - mydata[-select,] # testing temp.glm - glm(Death~Temperature, data=data70,

Re: [R] Cross validation in R

2013-07-02 Thread Adams, Jean
This code is untested, since you did not provide any example data. But it may help you get started. Jean mydata - read.csv(file.choose(), header=TRUE) library(ROCR) # ROC curve and assessment of my prediction plot(0:1, 0:1, type=n, xlab=False positive rate, ylab=True positive rate) abline(0,

Re: [R] Cross validation in R

2013-07-02 Thread Max Kuhn
How do i make a loop so that the process could be repeated several time, producing randomly ROC curve and under ROC values? Using the caret package http://caret.r-forge.r-project.org/ -- Max __ R-help@r-project.org mailing list

Re: [R] Cross-validation in R

2008-06-10 Thread Prof Brian Ripley
1) cv.glm is not 'in R', it is part of contributed package 'boot'. Please give credit where it is due. 2) There is nothing 'cross' about your 'home-made cross validation'. cv.glm is support software for a book, so please consult it for the definition used of cross-validation, or MASS (the

[R] Cross-validation in R

2008-06-09 Thread Luis Orlindo Tedeschi
Folks; I am having a problem with the cv.glm and would appreciate someone shedding some light here. It seems obvious but I cannot get it. I did read the manual, but I could not get more insight. This is a database containing 3363 records and I am trying a cross-validation to understand the