1
$\begingroup$

Hi I have doubt regarding the interaction. depth parameter in caret. I found a useful link hereabout interaction.depth in caret

Now I am trying to find the similar parameter in H2O-GBM . Can anyone tell in H2O what is equivalent to interaction.depth that is used in caret-gbm?

$\endgroup$
1

1 Answer 1

1
$\begingroup$

From the gbm package documentation:

interaction.depth: "Integer specifying the maximum depth of each tree (i.e., the highest level of variable interactions allowed). A value of 1 implies an additive model, a value of 2 implies a model with up to 2-way interactions, etc. Default is 1."

And for more details there is this question on what exactly interaction.depth is, which basically says "Package GBM uses interaction.depth parameter as a number of splits it has to perform on a tree (starting from a single node)".

But note that for every split you make the tree increases its depth. So while interaction.depth in GBM and max_depth in H2O may not be exactly the same thing the numbers map pretty well (i.e. interaction.depth=1 will grow a tree as deep as max_depth=1 in H2O-3), and max_depth is the closest option you have to interaction.depth

Here are a few images to illustrate what max_depth looks like in H2O-3, but as the linked question suggests, you should use pretty.gbm.tree function to explore exactly what interaction.depth does since the R GBM does not build trees the same way H2O-3 does (for example R GBM builds an additional terminal node for missing values which H2O-3 does not do).

max_depth = 1

enter image description here

max_depth = 2 enter image description here

max_depth = 3

enter image description here

$\endgroup$
5
  • $\begingroup$ Please check the below link link So according to this what I understood is that max_depth is not equal to interaction.depth. Can you please clarify this confusion? $\endgroup$
    – Kitooos
    Commented Nov 16, 2018 at 9:14
  • $\begingroup$ can you provide a link to the documentation for the caret gbm package and point to where they define interaction depth? If the link I have above is incorrect, I'm happy to update the answer. thanks! $\endgroup$
    – Lauren
    Commented Nov 16, 2018 at 16:42
  • $\begingroup$ cran.r-project.org/web/packages/gbm/gbm.pdf $\endgroup$
    – Kitooos
    Commented Nov 19, 2018 at 10:11
  • $\begingroup$ @Kitooos updated the answer, basically max_depth is your closest option to interaction.depth $\endgroup$
    – Lauren
    Commented Nov 20, 2018 at 17:19
  • $\begingroup$ Thank you very much Lauren ! I got a clear idea now :) $\endgroup$
    – Kitooos
    Commented Nov 21, 2018 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.