O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling forest generation

You can use the following additional options to control how the algorithm builds the forest:

  • mtry: This is the number of predictors to randomly sample at each split; the default is m/3, where m is the number of predictors
  • nodesize: This is the minimum size of terminal nodes; the default is 5, setting it higher causes smaller trees
  • maxnodes: This is the maximum number of terminal nodes that a tree can have; if unspecified, the trees are grown to the maximum size possible, subject to nodesize

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required