Skip to content

Commit c49294c

Browse files
committed
DOC verbose documentation of features and constant_features
1 parent 7419965 commit c49294c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sklearn/tree/_tree.pxd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ cdef class Splitter:
9292
# split reorganizes the node samples `samples[start:end]` in two
9393
# subsets `samples[start:pos]` and `samples[pos:end]`.
9494

95+
# The `features` array contains the features indices and allows fast
96+
# sampling without replacement of features.
97+
98+
# The `constant_features` array contains in `[:n_constant_features]` the
99+
# order and index of the constant features found at a given node. The value
100+
# `n_constant_features` is given by the the parent node to its child nodes.
101+
# This allows optimisation with depth-based tree building.
102+
95103
# Methods
96104
cdef void init(self, np.ndarray X,
97105
np.ndarray y,

0 commit comments

Comments
 (0)