File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ cdef class Splitter(BaseSplitter):
110
110
cdef bint check_presplit_conditions(
111
111
self ,
112
112
SplitRecord current_split,
113
+ SIZE_t n_missing,
114
+ bint missing_go_to_left,
113
115
) noexcept nogil
114
116
cdef bint check_postsplit_conditions(
115
117
self
Original file line number Diff line number Diff line change @@ -505,7 +505,7 @@ cdef inline int node_split_best(
505
505
current_split.pos = p
506
506
507
507
# Reject if min_samples_leaf is not guaranteed
508
- if splitter.check_presplit_conditions(current_split) == 1 :
508
+ if splitter.check_presplit_conditions(current_split, n_missing, missing_go_to_left ) == 1 :
509
509
continue
510
510
511
511
criterion.update(current_split.pos)
@@ -834,7 +834,7 @@ cdef inline int node_split_random(
834
834
current_split.pos = partitioner.partition_samples(current_split.threshold)
835
835
836
836
# Reject if min_samples_leaf is not guaranteed
837
- if splitter.check_presplit_conditions(current_split) == 1 :
837
+ if splitter.check_presplit_conditions(current_split, 0 , 0 ) == 1 :
838
838
continue
839
839
840
840
# Evaluate split
Original file line number Diff line number Diff line change @@ -764,7 +764,7 @@ cdef class BaseTree:
764
764
765
765
# While node not a leaf
766
766
while node.left_child != _TREE_LEAF:
767
- X_i_node_features = self ._compute_feature(X_ndarray, i, node)
767
+ X_i_node_feature = self ._compute_feature(X_ndarray, i, node)
768
768
# ... and node.right_child != _TREE_LEAF:
769
769
if isnan(X_i_node_feature):
770
770
if node.missing_go_to_left:
You can’t perform that action at this time.
0 commit comments