Available in: XGBoost, GBM
Specify the feature column interactions which are allowed to interact during tree building. Use column names to define which features can interact together. This option defaults to None/Null, which means that all column features are included.
Note: This option can only be used when the categorical encoding is set to
Overlap of interaction constraints¶
When the interaction constraints sets overlap, the XGBoost algorithm evaluates them differently then GBM algorithm. In this case the GBM checks the interaction constraints in the each whole branch, but XGBoost does not.
For example for
interaction_constraints = [["A", "B", "C"], ["C", "D"]]:
XGBoost allows branch with decision path “A” -> “C” -> “D”
GBM does not allow branch with decision path “A” -> “C” -> “D”, because “D” cannot interact with “A”