Skip to content

Commit

Permalink
GH-15809: fix metrics exposure in python
Browse files Browse the repository at this point in the history
  • Loading branch information
syzonyuliia-h2o authored and wendycwong committed Feb 5, 2024
1 parent a7269e4 commit da44bfe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions h2o-py/h2o/model/metrics_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,11 @@ def _str_items(self, verbosity=None):
"Null deviance: {}".format(self.null_deviance()),
"Residual deviance: {}".format(self.residual_deviance()),
])
if is_type(self.aic(), numeric) and self.aic() != 0:
items.append("AIC: {}".format(self.aic()))
if is_type(self.loglikelihood(), numeric) and self.loglikelihood() != 0:
items.append("Loglikelihood: {}".format(self.loglikelihood()))
if is_type(self.aic(), numeric) and self.aic() != 0:
items.append("AIC: {}".format(self.aic()))
if is_type(self.loglikelihood(), numeric) and self.loglikelihood() != 0:
items.append("Loglikelihood: {}".format(self.loglikelihood()))

items.extend(self._str_items_custom())
return items

Expand Down

0 comments on commit da44bfe

Please sign in to comment.