[R] randomForest maxnodes
Liaw, Andy
andy_liaw at merck.com
Fri Jan 15 23:54:28 CET 2010
Please try to follow the posting guide and give a reproducible example,
as below:
R> library(randomForest)
randomForest 4.5-34
Type rfNews() to see new features/changes/bug fixes.
R> iris2 = iris[-5]
R> iris.rf = randomForest(Petal.Width~., iris2, maxnodes=4, ntree=50)
R> nodesize(iris.rf)
Error: could not find function "nodesize"
R> treesize(iris.rf)
[1] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4
[39] 4 4 4 4 4 4 4 4 4 4 4 4
Andy
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Epic John
> Sent: Friday, January 15, 2010 4:50 PM
> To: r-help at r-project.org
> Subject: [R] randomForest maxnodes
>
> Has anyone sucessfully used the maxnodes feature in
> randomForest? I tried
> setting it, but when it is non-NULL I always get back a
> forest in which all
> trees have size 1. I am using a continuous response
> (regression). Any help
> would be appreciated.
> Thanks.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
Notice: This e-mail message, together with any attachme...{{dropped:10}}
More information about the R-help
mailing list