Solved – Interaction depth parameter in GBM

boostingcartr

In the GBM package one is supposed to be able to provide interaction.depth>2, which means higher-order interactions between features.
However, the resulting trees (as seen by pretty.gbm.tree) never show such interactions (and indeed – each row corresponds to just a single feature).

I'm not even sure anymore that the package actually supports depth>2….

Does anybody have any idea?

Best Answer

GBM considers the tree itself to be the instrument of realising interactions, thus interaction.depth equal $d$ means GBM will be building trees no deeper than $d$ rather than tress with splits considering $d$ attributes.

So, it works as expected.