mirror of
https://github.com/Doctorado-ML/Odte.git
synced 2025-07-11 16:22:00 +00:00
Fix nodes_leaves for base_estimator
This commit is contained in:
parent
3558c946a8
commit
74343a15e1
@ -88,8 +88,9 @@ class Odte(BaseEnsemble, ClassifierMixin):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def _compute_metrics(self) -> None:
|
def _compute_metrics(self) -> None:
|
||||||
tdepth = tnodes = tleaves = 0
|
tdepth = tnodes = tleaves = 0.0
|
||||||
for estimator in self.estimators_:
|
for estimator in self.estimators_:
|
||||||
|
if hasattr(estimator, "nodes_leaves"):
|
||||||
nodes, leaves = estimator.nodes_leaves()
|
nodes, leaves = estimator.nodes_leaves()
|
||||||
depth = estimator.depth_
|
depth = estimator.depth_
|
||||||
tdepth += depth
|
tdepth += depth
|
||||||
|
Loading…
x
Reference in New Issue
Block a user