[BioC] error in using random forest

Naomi Altman naomi at stat.psu.edu
Tue Mar 6 21:50:00 CET 2012


Hi Salwa,
Please remember to "reply all" to keep this on the list.

Try

apply(mydata,2,class)

to see the classes of the columns of the data matrix (mydata).  I 
expect that somewhere you have another identifier column.

--Naomi

At 01:25 PM 3/6/2012, you wrote:

>  Yes I do have sample ids.  I tried removing them and tried the 
> random forest but it still gave me the same error.  If i use 32 or 
> less samples, it works fine but otherwise it gives me the error.
> > Date: Tue, 6 Mar 2012 13:09:40 -0500
> > To: mtmorgan at fhcrc.org; salwaeid at hotmail.com
> > From: naomi at stat.psu.edu
> > Subject: Re: [BioC] error in using random forest
> > CC: bioconductor at r-project.org
> >
> > Do you have sample ids? These could be the offending variables.
> >
> > --Naomi
> >
> > At 11:28 AM 3/6/2012, Martin Morgan wrote:
> > >On 03/06/2012 08:17 AM, Salwa Eid 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
> > >> [[alternative HTML version deleted]]
> > >
> > >likely your data is not formatted correctly, perhaps confusing
> > >factor and level. But without a reproducible example it is hard 
> to help. Martin
> > >
> > >>
> > >>_______________________________________________
> > >>Bioconductor mailing list
> > >>Bioconductor at r-project.org
> > >>https://stat.ethz.ch/mailman/listinfo/bioconductor
> > >>Search the archives:
> > >>http://news.gmane.org/gmane.science.biology.informatics.conductor
> > >
> > >
> > >--
> > >Computational Biology
> > >Fred Hutchinson Cancer Research Center
> > >1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
> > >
> > >Location: M1-B861
> > >Telephone: 206 667-2793
> > >
> > >_______________________________________________
> > >Bioconductor mailing list
> > >Bioconductor at r-project.org
> > >https://stat.ethz.ch/mailman/listinfo/bioconductor
> > >Search the archives:
> > >http://news.gmane.org/gmane.science.biology.informatics.conductor
> >
> >
> >



More information about the Bioconductor mailing list