[R] Fwd: varimp_in_party_package

Jinrui Xu jinruixu at umich.edu
Thu Jun 16 22:47:17 CEST 2011


Sorry, Patrick and other victims. My bad~~

The data file can be accessed at
http://zhanglab.ccmb.med.umich.edu/TM-fold/featureSelection_rec.vectors

The code is attached below. Error happens at  "data.cforest.varimp <-  
varimp(data.cforest, conditional = TRUE)": "Error in  
model.matrix.default(as.formula(f),data = blocks): term 1 would  
require 4e+17 columns".

Reducing dimension of each vector to 300 still gives same error feedback.


library(randomForest)
library(party)
set.seed(71)
rawinput <- read.table("featureSelection_rec.vectors")
rawinput$V1 <- as.factor(as.numeric(rawinput$V1))
data.controls <- cforest_unbiased(ntree=500, mtry=3)
data.cforest <- cforest(V1~.,data=rawinput,controls=data.controls)
data.cforest.varimp <- varimp(data.cforest, conditional = TRUE)

Thanks!
jinrui,

Quoting Patrick Connolly <p_connolly at slingshot.co.nz>:

> On Thu, 16-Jun-2011 at 09:19AM -0400, Jinrui Xu wrote:
>
>> Thanks for your feedback.
>> I think the problem is not because of many levels. There is only 1
>> column with two levels as class labels in my input data.
>>
>> Below is my code. The commandline "data.cforest.varimp <-
>> varimp(data.cforest, conditional = TRUE)" reports "Error in
>> model.matrix.default(as.formula(f),data = blocks): term 1 would require
>> 4e+17 columns"
>>
>> I also attached my input file. Hope you can run it for me to check what
>> the problem is. Thanks a lot!
>>
>> PS: It takes 10 mins to finish the code below by 1 cpu and upto 2.5 GB
>> memory. You can reduce the columns in the rawinput, which reduces
>> computing intense and feeds back same error.
>
> It also uses 10% of my monthly mobile data allowance to download a
> 10Mb data file.  Please don't send that much with email.  Give a URL
> to where those interested can download it.
>
>
>
> --
> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
>    ___    Patrick Connolly
>  {~._.~}                   Great minds discuss ideas
>  _( Y )_  	         Average minds discuss events
> (:_~*~_:)                  Small minds discuss people
>  (_)-(_)  	                      ..... Eleanor Roosevelt
>
> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
>
>
>



More information about the R-help mailing list