Displaying 5 results from an estimated 5 matches for "rfecontrol".
2010 Mar 23
1
caret package, how can I deal with RFE+SVM wrong message?
...As we know, there are a number of pre-defined sets of functions, 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&...
Please help me!!!! Error in `[.data.frame`(x, , retained, drop = FALSE) : undefined columns selected
2010 Jan 02
1
Please help me!!!! Error in `[.data.frame`(x, , retained, drop = FALSE) : undefined columns selected
...E) :
undefined columns selected
In addition: Warning message:
In predict.lm(object, 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....
2011 May 01
0
Dummy variables using rfe in caret for variable selection
...es a dummy variable with 3 levels.
x <- chlDescr
y <- chl
#crate 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(obje...
2011 Aug 22
3
Ignoring loadNamespace errors when loading a file
On a Unix machine I ran caret::rfe using the multicore package, and I
saved the resulting object using save(lm2, file = "lm2.RData").
[Reproducible example below.]
When I try to load("lm2.RData") on my Windows laptop, I get
Error in loadNamespace(name) : there is no package called 'multicore'
I completely understand the error and I would like to ignore it and
2010 Mar 24
0
R-help ordinal regression
...sets of
> functions, 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
>...