David L. Van Brunt, Ph.D.
2005-Oct-27 04:30 UTC
[R] Repost: Examples of "classwt", "strata", and "sampsize" in randomForest?
Sorry for the repost, but I've really been looking, and can't find any syntax direction on this issue... Just browsing the documentation, and searching the list came up short... I have some unbalanced data and was wondering if, in a "0" v "1" classification forest, some combo of these options might yield better predictions when the proportion of one class is low (less than 10% in a sample of 2,000 observations). Not sure how to specify these terms... from the docs, we have: classwt: Priors of the classes. Need not add up to one. Ignored for regression. So is this something like "... classwt=c(.90,.10)" ? I didn't see the syntax demonstrated. Similar for "strata" and "sampsize" though there is a default for sampsize that makes sense... not sure how you would make "a vector of the length the number of strata", however.... Pointers? -- --------------------------------------- David L. Van Brunt, Ph.D. mailto:dlvanbrunt@gmail.com -- --------------------------------------- David L. Van Brunt, Ph.D. mailto:dlvanbrunt@gmail.com [[alternative HTML version deleted]]
Gabor Grothendieck
2005-Oct-27 05:10 UTC
[R] Repost: Examples of "classwt", "strata", and "sampsize" in randomForest?
See finzi.psych.upenn.edu/R/Rhelp02a/archive/40898.html On 10/27/05, David L. Van Brunt, Ph.D. <dlvanbrunt at gmail.com> wrote:> Sorry for the repost, but I've really been looking, and can't find any > syntax direction on this issue... > > Just browsing the documentation, and searching the list came up short... I > have some unbalanced data and was wondering if, in a "0" v "1" > classification forest, some combo of these options might yield better > predictions when the proportion of one class is low (less than 10% in a > sample of 2,000 observations). > > Not sure how to specify these terms... from the docs, we have: > > classwt: Priors of the classes. Need not add up to one. Ignored for > regression. > > So is this something like "... classwt=c(.90,.10)" ? I didn't see the syntax > demonstrated. Similar for "strata" and "sampsize" though there is a default > for sampsize that makes sense... not sure how you would make "a vector of > the length the number of strata", however.... > > Pointers? > > -- > --------------------------------------- > David L. Van Brunt, Ph.D. > mailto:dlvanbrunt at gmail.com > > -- > --------------------------------------- > David L. Van Brunt, Ph.D. > mailto:dlvanbrunt at gmail.com > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! R-project.org/posting-guide.html >
Maybe Matching Threads
- Repost: Examples of "classwt", "strata", and "sampsize" i n randomForest?
- Examples of "classwt", "strata", and "sampsize" in randomForest?
- help with RandomForest classwt option
- How to use classwt parameter option in RandomForest
- class weights with Random Forest