mirror of
https://github.com/Doctorado-ML/STree.git
synced 2025-08-18 17:06:01 +00:00
Fix compute number of nodes
This commit is contained in:
@@ -841,10 +841,9 @@ class Stree(BaseEstimator, ClassifierMixin):
|
||||
nodes = 0
|
||||
leaves = 0
|
||||
for node in self:
|
||||
nodes += 1
|
||||
if node.is_leaf():
|
||||
leaves += 1
|
||||
else:
|
||||
nodes += 1
|
||||
return nodes, leaves
|
||||
|
||||
def __iter__(self) -> Siterator:
|
||||
|
Reference in New Issue
Block a user