[R] Help with Caret

2015-01-09 Thread Lisa Gandy
*My code is below:* library('RMySQL') library('DMwR') library('tm') library('Snowball') library('SnowballC') con <- dbConnect(MySQL(), user="root", password="stuff0645", dbname="TwitterCelebs", host="localhost") rt_outlier <- dbGetQuery(con, "SELECT *,tweet_text from outlier_info,tweets where ou

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) set.s

[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 = "knn",tuneGr