[BioC] error in using random forest

Steve Lianoglou mailinglist.honeypot at gmail.com
Tue Mar 6 18:17:39 CET 2012


Hi,

On Tue, Mar 6, 2012 at 11:17 AM, Salwa Eid <salwaeid at hotmail.com> wrote:
>
> Hello everyone,     I have tried using random forest as classifier for two classes.  My data consists of 58 samples and each one of them belongs one of the two classes.  When I tried runnng the random forest for the 58 samples, it gave me the followng error: Error in randomForest.default(m,y,...):  Can not handle categorical predctors wth more than 32 categories. Although I have only 2 classes only.  When i tried running it on 32 or less samples, it worked but when  increased the samples, gave me this error.   I thought maybe there is a limitations to the input data but the iris example has 150 samples and it works just fine.   Any help? regards,salwa

The error is telling you that you have some categorical
variable/predictor (ie. one of the columns in your input data.frame
that is *not* your label) that has more than 32 levels -- it's not
talking about the number of classes (levels) your labels have.

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list