2
$\begingroup$

I have read from several sources but I didn't fully get it (a similar question was asked in StackExchange 1 but the answer is not satisfying for me). I have still some questions waiting for the answers. I am referring to specifically the "nodesize" parameter in Braiman's RandomForest package in R.

I understand in general terms, it's a parameter which controls the depth of the tree implicitly, but I am confused when it comes to the details.

In RandomForest package document:

Minimum size of terminal nodes. Setting this number larger causes smaller trees to be grown (and thus take less time). Note that the default values are different for classification (1) and regression (5).

1) What does the "minimum size of terminal nodes" means?

2) Does the nodesize to be 1 for classification mean to split the nodes until the division results in only 1 node, in other words, until the node is pure?

3) If the nodesize 5, the minimum terminal nodes condition cannot be satisfied using a factor attribute which has only 2 levels. Because split using 2-levels-factor attribute results in two leaves at maximum.

I expect you correct where I am wrong.

$\endgroup$
3
  • $\begingroup$ Your edited question is still mostly answered at the linked question. But for your new #1: 'minimum size of terminal nodes' is the minimum number of points retained in a terminal node. A node cannot be split further once it has reached this minimum. If you require a larger number of points to be retained (i.e. you set a larger nodesize), obviously fewer splits can be performed before this threshold is reached and no further splitting can be done. Therefore, a larger minimum nodesize implies smaller trees (i.e. fewer splits). $\endgroup$
    – mkt
    Commented May 6, 2019 at 6:57
  • $\begingroup$ Thanks for the comment. So to be sure, setting the node size 1 means to grow tree to the largest possible extent ignoring the other constraints? $\endgroup$
    – ibilgen
    Commented May 8, 2019 at 9:20
  • $\begingroup$ That seems correct to me. $\endgroup$
    – mkt
    Commented May 8, 2019 at 9:58

0

Browse other questions tagged or ask your own question.