[R] Help with caret, please

2014-10-11 Thread Iván Vallés Pérez
Hello, I am using caret package in order to train a K-Nearest Neigbors algorithm. For this, I am running this code: Control - trainControl(method=cv, summaryFunction=twoClassSummary, classProb=T) tGrid=data.frame(k=1:100) trainingInfo - train(Formula, data=trainData, method =

Re: [R] Help with caret, please

2014-10-11 Thread Max Kuhn
What you are asking is a bad idea on multiple levels. You will grossly over-estimate the area under the ROC curve. Consider the 1-NN model: you will have perfect predictions every time. To do this, you will need to run train again and modify the index and indexOut objects: library(caret)