search for: returnresamp

Displaying 8 results from an estimated 8 matches for "returnresamp".

2010 Mar 23
1
caret package, how can I deal with RFE+SVM wrong message?
...like random Forest(rfFuncs), however,I want to tune the parameters (mtr) when RFE, and then I write code below, but there is something wrong message, How can I deal with it? > rfGrid<-expand.grid(.mtry=c(1:2)) > rfectrl<-rfeControl(functions=caretFuncs,method="cv",verbose=F,returnResamp="final",number=10) > subsets<-c(3,4) > set.seed(2) > rf.RFE<-rfe(trx,try,sizes=subsets,rfeControl=rfectrl,method="rf",tuneGrid=rfGrid) Loading required package: class Attaching package: 'class' The following object(s) are masked from package:res...
2011 Aug 28
1
Trying to extract probabilities in CARET (caret) package with a glmStepAIC model
...the AUC and predicted probabilities I had to add " classProbs = TRUE," in the trainControl. Thereafter everytime I run train I get this message: "undefined columns selected" I copy the syntax: fitControl <- trainControl(method = "cv", number = 10, classProbs = TRUE,returnResamp = "all", verboseIter = FALSE) glmFit <- train(Descr, Categ, method = "glmStepAIC",tuneLength = 4,trControl = fitControl) Thank you. Best regards, Jon Toledo, MD Postdoctoral fellow University of Pennsylvania School of Medicine Center for Neurodegenerative Disease Research 3...
2012 Nov 23
1
caret train and trainControl
...to packages like e1071 where you have a tune step and then pass your tunings to train. It seems with caret, tuning and training are both handled by train. I am using train and trainControl to find my hyper parameters like so: MyTrainControl=trainControl( method = "cv", number=5, returnResamp = "all", classProbs = TRUE ) rbfSVM <- train(label~., data = trainset, method="svmRadial", tuneGrid = expand.grid(.sigma=c(0.0118),.C=c(8,16,32,64,128)), trControl=MyTrainControl, fit = FALSE )...
2009 Jan 15
2
problems with extractPrediction in package caret
...ainControl() command. Now I want to evaluate my model and make predictions on a test dataset. I tried to follow the instructions in the manual and the vignettes but unfortunately I´m getting an error message I can`t figure out. Here is my code: rfControl <- trainControl(method = "oob", returnResamp = "all", returnData=TRUE, verboseIter = TRUE) rftrain <- train(x=train_x, y=trainclass, method="rf", tuneGrid=tuneGrid, tr.control=rfControl) pred <- predict(rftrain) pred # this works fine expred <- extractPrediction(rftrain) Error in models[[1]]$trainingData : $...
2010 Jan 02
1
Please help me!!!! Error in `[.data.frame`(x, , retained, drop = FALSE) : undefined columns selected
...ct, x) : prediction from a rank-deficient fit may be misleading I try to that manual example, that is good, my data is wrong. I do not know what reanson? my code is : subsets<-c(1:5,10,15,20,25) ctrl<-rfeControl(functions=lmFuncs, method = "cv", verbose=FALSE,returnResamp="final") lmProfile<-rfe(trainDescr,trainY,sizes=subsets,rfeControl=ctrl) before it, I have do some pre-process and my data is in the attachment. Please help me. thank you! kevin http://n4.nabble.com/file/n996068/trainDescr.txt trainDescr.txt http://n4.nabble.com/file/n996068/tra...
2012 Nov 29
1
Help with this error "kernlab class probability calculations failed; returning NAs"
...- trainset index <- 1:nrow(dataset) testindex <- sample(index, trunc(length(index)*30/100)) trainset <- dataset[-testindex,] testset <- dataset[testindex,-1] ## TUNE caret / kernlab set.seed(1) MyTrainControl=trainControl( method = "repeatedcv", number=10, repeats=5, returnResamp = "all", classProbs = TRUE ) ## MODEL rbfSVM <- train(outcome~., data = trainset, method="svmRadial", preProc = c("scale"), tuneLength = 10, trControl=MyTrainControl, fit...
2011 May 01
0
Dummy variables using rfe in caret for variable selection
...te dummy variable levels(x$State) <- c("AL","GA","FL") dummy <- model.matrix(~State,x) z <- cbind(dummy, x) #remove State category variable w <- z[,c(-4)] subsets <- c(2:8) ctrl<- rfeControl(functions = lmFuncs, method="cv", verbose=FALSE, returnResamp = "final") lmProfile <- rfe(w, y, sizes = subsets, rfeControl = ctrl) Returns: Error in `[.data.frame`(x, , retained, drop = FALSE) : undefined columns selected In addition: Warning message: In predict.lm(object, x) : prediction from a rank-deficient fit may be misleading When...
2010 Mar 24
0
R-help ordinal regression
...er,I want to tune the > parameters (mtr) when > RFE, and then I write code below, but there is something > wrong message, How > can I deal with it?? > > rfGrid<-expand.grid(.mtry=c(1:2)) > > > rfectrl<-rfeControl(functions=caretFuncs,method="cv",verbose=F,returnResamp="final",number=10) > > subsets<-c(3,4) > > set.seed(2) > > > rf.RFE<-rfe(trx,try,sizes=subsets,rfeControl=rfectrl,method="rf",tuneGrid=rfGrid) > Loading required package: class > > Attaching package: 'class' > > > ? ? ? ? T...