thanks ,now i reduce the number of the descriptors, It is ok.


在2010-01-03,"Max Kuhn [via R]" <ml-node+997387-1292262...@n4.nabble.com> 
写道: -----原始邮件-----
发件人:"Max Kuhn [via R]" <ml-node+997387-1292262...@n4.nabble.com>
发送时间:2010年1月3日 星期日
收件人:bbslover <dlu...@yeah.net>
主题:Re: [R] Please help me!!!! Error in `[.data.frame`(x, , retained, drop = 
FALSE) : undefined columns selected

Your data set has 217 predictors and 166 samples. If you read the 
vignette on feature selection for this package, you'll see that the 
default ranking mechanism that it uses for linear models requires a 
linear model fit. The note that: 

   >  prediction from a rank-deficient fit may be misleading 

should tell you something. If it doesn't: the model fit is over 
determined and there is no unique solution, so many of the parameter 
estimates are NA. 

Either create a modified version of lmFuncs that suits your needs or 
remove variables prior to modeling (or try some other method that 
doesn't require more samples than predictors, such as the lasso or 
elasticnet). 

Max 

On Fri, Jan 1, 2010 at 10:14 PM, bbslover <[hidden email]> wrote: 

> 
> I am learning the package "caret", after I do the "rfe" function, I get the 
> error ,as follows: 
> 
> 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 
> 
> 
> 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! 
> 
> kevinhttp://n4.nabble.com/file/n996068/trainDescr.txt trainDescr.txt 
>http://n4.nabble.com/file/n996068/trainY.txt trainY.txt 
> -- 
> View this message in 
> context:http://n4.nabble.com/Please-help-me-Error-in-data-frame-x-retained-drop-FALSE-undefined-columns-selected-tp996068p996068.html
> Sent from the R help mailing list archive at Nabble.com. 
> 
> ______________________________________________ 
>[hidden email]mailing list 
>https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code. 
> 



-- 

Max 

______________________________________________ 
[hidden email]mailing list 
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code. 



View message 
@http://n4.nabble.com/Please-help-me-Error-in-data-frame-x-retained-drop-FALSE-undefined-columns-selected-tp996068p997387.html
To unsubscribe from Please help me!!!! Error in `[.data.frame`(x, , retained, 
drop = FALSE) : undefined columns selected,click here. 


-- 
View this message in context: 
http://n4.nabble.com/Please-help-me-Error-in-data-frame-x-retained-drop-FALSE-undefined-columns-selected-tp996068p997622.html
Sent from the R help mailing list archive at Nabble.com.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to