Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Li <adam2392@gmail.com>
  • Loading branch information
adam2392 committed Aug 8, 2024
1 parent d91f873 commit 70139e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions treeple/tree/_honest_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,9 +781,9 @@ def _set_leaf_nodes(self, leaf_ids, y, sample_weight):
total_n_node_samples += y_weight

if leaf_id in seen_leaf_ids:
self.tree_.value[leaf_id][:, yval] += 1 # y_weight
self.tree_.value[leaf_id][:, yval] += y_weight
else:
self.tree_.value[leaf_id][:, yval] = 1 # y_weight
self.tree_.value[leaf_id][:, yval] = y_weight
seen_leaf_ids.add(leaf_id)

for leaf_id in seen_leaf_ids:
Expand Down

0 comments on commit 70139e7

Please sign in to comment.