dmlc / dmlc/xgboost

Interaction constraint example inconstant with its actual behavor.

Open
#8,905 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
28.8k
Forks
8.9k
Avg merge
1d 12h
Merged PRs (30d)
54

Description

Hi,

The example in https://xgboost.readthedocs.io/en/latest/tutorials/feature_interaction_constraint.html#advanced-topic says that given the interaction constraints [0, 1], [1, 3, 4], XGB may generate leaf nodes with splits like [0, 1, 3]. However, after conducting some experiments, I find this may be not true. See the Colab link below for the reproducible experiments.
https://colab.research.google.com/drive/1sFBqpM3wMNEcrlAfTF2bQCvSUIrsS_eu?usp=sharing

The source code in https://github.com/dmlc/xgboost/blob/3689695d16c3fc3b160d6917a55cb899932f91d4/src/tree/constraints.cc#L80-L101 also prohibits interactions like [0, 1, 3].

I think the current behavior is preferable, and it would be better to revise the documentation in https://xgboost.readthedocs.io/en/latest/tutorials/feature_interaction_constraint.html#advanced-topic.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.