We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8756b64 + 48a6aec commit 93b605fCopy full SHA for 93b605f
libmultilabel/linear/tree.py
@@ -101,7 +101,7 @@ def _separate_model_for_pruning_tree(self):
101
self.subtree_models = []
102
for i in range(len(self.root.children)):
103
subtree_weights_start = self.node_ptr[self.root.children[i].index]
104
- subtree_weights_end = self.node_ptr[self.root.children[i+1].index] if i+1 < len(self.root.children) else -1
+ subtree_weights_end = self.node_ptr[self.root.children[i+1].index] if i+1 < len(self.root.children) else self.node_ptr[-1]
105
slice = np.s_[:, subtree_weights_start:subtree_weights_end]
106
subtree_flatmodel = linear.FlatModel(
107
name="subtree-flattened-tree",
0 commit comments