Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX pruning method (potentially exclusive to MIGHT-O) #349

Open
PSSF23 opened this issue Feb 21, 2025 · 0 comments · Fixed by #350
Open

FIX pruning method (potentially exclusive to MIGHT-O) #349

PSSF23 opened this issue Feb 21, 2025 · 0 comments · Fixed by #350
Assignees
Labels
bug Something isn't working

Comments

@PSSF23
Copy link
Member

PSSF23 commented Feb 21, 2025

@adam2392 @YuxinB @SUKI-O

Traceback (most recent call last):
  File "/cis/home/iogihar1/miniconda3/envs/sktree/lib/python3.9/site-packages/joblib/_utils.py", line 72, in _call_
    return self.func(**kwargs)
  File "/cis/home/iogihar1/miniconda3/envs/sktree/lib/python3.9/site-packages/joblib/parallel.py", line 598, in _call_
    return [func(*args, **kwargs)
  File "/cis/home/iogihar1/miniconda3/envs/sktree/lib/python3.9/site-packages/joblib/parallel.py", line 598, in <listcomp>
    return [func(*args, **kwargs)
  File "/cis/home/iogihar1/miniconda3/envs/sktree/lib/python3.9/site-packages/treeple/ensemble/_honest_forest.py", line 78, in _parallel_build_trees
    tree._fit(
  File "/cis/home/iogihar1/miniconda3/envs/sktree/lib/python3.9/site-packages/treeple/tree/_honest_tree.py", line 676, in _fit
    self._fit_leaves(X, y, sample_weight=sample_weight_leaves)
  File "/cis/home/iogihar1/miniconda3/envs/sktree/lib/python3.9/site-packages/treeple/tree/_honest_tree.py", line 768, in _fit_leaves
    self._set_leaf_nodes(honest_leaves, y, sample_weight)
  File "/cis/home/iogihar1/miniconda3/envs/sktree/lib/python3.9/site-packages/treeple/tree/_honest_tree.py", line 797, in _set_leaf_nodes
    self.tree_.value[leaf_id][:, yval] += y_weight
IndexError: arrays used as indices must be of integer (or boolean) type

So we found this error on pruned version of MIGHT-O:
https://github.com/neurodata/treeple/blob/main/treeple/tree/_honest_tree.py#L768

@adam2392, you mentioned that these lines might not be necessary? We know that without these lines, pruning doesn't work from @YuxinB's earlier results.

@PSSF23 PSSF23 added the bug Something isn't working label Feb 21, 2025
@PSSF23 PSSF23 linked a pull request Feb 21, 2025 that will close this issue
@PSSF23 PSSF23 self-assigned this Feb 21, 2025
@PSSF23 PSSF23 reopened this Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant