Skip to content

Commit e772be0

Browse files
committed
Remove name of TreeModel since we only have one now.
1 parent 773741d commit e772be0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libmultilabel/linear/tree.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ def dfs(self, visit: Callable[[Node], None]):
3838

3939
class TreeModel:
4040
def __init__(self,
41-
name: str,
4241
root: Node,
4342
flat_model: linear.FlatModel,
4443
weight_map: np.ndarray,
4544
):
46-
self.name = name
45+
self.name = 'tree'
4746
self.root = root
4847
self.flat_model = flat_model
4948
self.weight_map = weight_map
@@ -151,7 +150,7 @@ def visit(node):
151150
pbar.close()
152151

153152
flat_model, weight_map = _flatten_model(root)
154-
return TreeModel('tree', root, flat_model, weight_map)
153+
return TreeModel(root, flat_model, weight_map)
155154

156155

157156
def _build_tree(label_representation: sparse.csr_matrix,

0 commit comments

Comments
 (0)