8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b31eea0 commit d9b273aCopy full SHA for d9b273a
sklearn/ensemble/_hist_gradient_boosting/grower.py
@@ -616,11 +616,11 @@ def split_next(self):
616
617
def _get_allowed_features(self, parent_feature_idx):
618
"""Return all feature indices allowed to be split by interaction_cst."""
619
- allowed_features = []
+ allowed_features = set()
620
for group in self.interaction_cst:
621
if parent_feature_idx in group:
622
- allowed_features.extend(group)
623
- return np.array(sorted(allowed_features), dtype=int)
+ allowed_features.update(group)
+ return np.array(list(allowed_features), dtype=int)
624
625
def _finalize_leaf(self, node):
626
"""Make node a leaf of the tree being grown."""
0 commit comments