8000 CLN make allowed_features an instance variable · scikit-learn/scikit-learn@015b30e · GitHub
[go: up one dir, main page]

Skip to content

Commit 015b30e

Browse files
committed
CLN make allowed_features an instance variable
1 parent f2a0679 commit 015b30e

File tree

1 file changed

+4
-2
lines changed
  • sklearn/ensemble/_hist_gradient_boosting

1 file changed

+4
-2
lines changed

sklearn/ensemble/_hist_gradient_boosting/grower.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ class TreeNode:
7474
Indices of the interaction sets/groups that have to be applied on
7575
splits of child nodes. The fewer sets the harder the constraint as
7676
fewer sets contain fewer features.
77+
children_lower_bound : float
78+
children_upper_bound : float
7779
"""
7880

7981
split_info = None
8082
left_child = None
8183
right_child = None
8284
histograms = None
83-
allowed_features = None
84-
interaction_cst_idx = None
8585

8686
# start and stop indices of the node in the splitter.partition
8787
# array. Concretely,
@@ -102,6 +102,8 @@ def __init__(self, depth, sample_indices, sum_gradients, sum_hessians, value=Non
102102
self.sum_hessians = sum_hessians
103103
self.value = value
104104
self.is_leaf = False
105+
allowed_features = None # noqa: F841
106+
interaction_cst_idx = None # noqa: F841
105107
self.set_children_bounds(float("-inf"), float("+inf"))
106108

107109
def set_children_bounds(self, lower, upper):

0 commit comments

Comments
 (0)
0