class_docstr: A parent class to house common metrics available for the various Metrics types.
  
  The methods here are available across different model categories.
  
  .. note::
      This class and its subclasses are used at runtime as mixins: their methods can (and should) be accessed directly 
      from a metrics object, for example as a result of :func:`~h2o.model.ModelBase.model_performance`.
class_docstr_tok: ["A","parent","class","to","house","common","metrics","available","for","the","various","Metrics","types",".","The","methods","here","are","available","across","different","model","categories",".","..","note",":",":","This","class","and","its","subclasses","are","used","at","runtime","as","mixins",":","their","methods","can","(","and","should",")","be","accessed","directly","from","a","metrics","object",",","for","example","as","a","result","of",":","func",":","`","~h2o.model.ModelBase.model_performance","`","."]
code: def _str_items(self, verbosity=None):
      # edge cases
      if self._metric_json is None:
          return "WARNING: Model metrics cannot be calculated, please check that the response column was correctly provided in your dataset."
  
      metric_type = self._metric_json["__meta"]["schema_type"]
  
      # metric cond based on data distribution
      m_is_binomial = "Binomial" in metric_type
      m_is_multinomial = "Multinomial" in metric_type
      m_is_ordinal = "Ordinal" in metric_type
      m_is_regression = "Regression" in metric_type
  
      # metric cond based on algo
      m_is_anomaly = "Anomaly" in metric_type
      m_is_clustering = "Clustering" in metric_type
      m_is_generic = "Generic" in metric_type
      m_is_glm = "GLM" in metric_type
      m_is_hglm = "HGLM" in metric_type
      m_is_uplift = "Uplift" in metric_type
  
      # fixme: can't we rather check if each value is available instead of doing this weird logic?
      #  we could have mixin extensions for algos like (H)GLM instead taking everything from this (not so) "base" class.
      # specific metric cond
      m_supports_logloss = (
          m_is_binomial or m_is_multinomial or m_is_ordinal
      ) and not m_is_uplift
      m_supports_mpce = (
          m_is_binomial or m_is_multinomial or m_is_ordinal
      ) and not (
          m_is_glm or m_is_uplift
      )  # GLM excluded?
      m_supports_mse = not (
          m_is_anomaly or m_is_clustering or m_is_uplift
      )
      m_supports_r2 = m_is_regression and m_is_glm
  
      items = [
          "{mtype}: {algo}".format(mtype=metric_type, algo=self._algo),
          "** Reported on {} data. **".format(self._on),
          "",
      ]
      if (
          self.custom_metric_name()
      ):  # adding on top: if users specifies a custom metric, it needs to be highlighted.
          items.append(
              "{name}: {value}".format(
                  name=self.custom_metric_name(),
                  value=self.custom_metric_value(),
              )
          )
      if m_supports_mse:
          items.extend(
              [
                  "MSE: {}".format(self.mse()),
                  "RMSE: {}".format(self.rmse()),
              ]
          )
      if m_is_regression:
          items.extend(
              [
                  "MAE: {}".format(self.mae()),
                  "RMSLE: {}".format(self.rmsle()),
                  "Mean Residual Deviance: {}".format(
                      self.mean_residual_deviance()
                  ),
              ]
          )
      if m_supports_r2:
          items.append("R^2: {}".format(self.r2()))
      if m_supports_logloss:
          items.append("LogLoss: {}".format(self.logloss()))
      if m_supports_mpce:
          items.append(
              "Mean Per-Class Error: {}".format(
                  self._mean_per_class_error()
              )
          )
      if (
          m_is_binomial and not m_is_uplift
      ):  # can be picked from H2OBinomialModelMetrics (refers to method not available in this class!)
          items.extend(
              [
                  "AUC: {}".format(self.auc()),
                  "AUCPR: {}".format(self.aucpr()),
                  "Gini: {}".format(self.gini()),
              ]
          )
      if m_is_multinomial:
          auc, aucpr = self.auc(), self.aucpr()
          if is_type(auc, numeric):
              items.append("AUC: {}".format(auc))
          if is_type(aucpr, numeric):
              items.append("AUCPR: {}".format(aucpr))
      if m_is_glm:
          if m_is_hglm and not m_is_generic:
              items.extend(
                  [
                      "Standard error of fixed columns: {}".format(
                          self.hglm_metric("sefe")
                      ),
                      "Standard error of random columns: {}".format(
                          self.hglm_metric("sere")
                      ),
                      "Coefficients for fixed columns: {}".format(
                          self.hglm_metric("fixedf")
                      ),
                      "Coefficients for random columns: {}".format(
                          self.hglm_metric("ranef")
                      ),
                      "Random column indices: {}".format(
                          self.hglm_metric("randc")
                      ),
                      "Dispersion parameter of the mean model (residual variance for LMM): {}".format(
                          self.hglm_metric("varfix")
                      ),
                      "Dispersion parameter of the random columns (variance of random columns): {}".format(
                          self.hglm_metric("varranef")
                      ),
                      "Convergence reached for algorithm: {}".format(
                          self.hglm_metric("converge")
                      ),
                      "Deviance degrees of freedom for mean part of the model: {}".format(
                          self.hglm_metric("dfrefe")
                      ),
                      "Estimates and standard errors of the linear prediction in the dispersion model: {}".format(
                          self.hglm_metric("summvc1")
                      ),
                      "Estimates and standard errors of the linear predictor for the dispersion parameter of the random columns: {}".format(
                          self.hglm_metric("summvc2")
                      ),
                      "Index of most influential observation (-1 if none): {}".format(
                          self.hglm_metric("bad")
                      ),
                      "H-likelihood: {}".format(
                          self.hglm_metric("hlik")
                      ),
                      "Profile log-likelihood profiled over random columns: {}".format(
                          self.hglm_metric("pvh")
                      ),
                      "Adjusted profile log-likelihood profiled over fixed and random effects: {}".format(
                          self.hglm_metric("pbvh")
                      ),
                      "Conditional AIC: {}".format(
                          self.hglm_metric("caic")
                      ),
                  ]
              )
          else:
              items.extend(
                  [
                      "Null degrees of freedom: {}".format(
                          self.null_degrees_of_freedom()
                      ),
                      "Residual degrees of freedom: {}".format(
                          self.residual_degrees_of_freedom()
                      ),
                      "Null deviance: {}".format(self.null_deviance()),
                      "Residual deviance: {}".format(
                          self.residual_deviance()
                      ),
                  ]
              )
              if is_type(self.aic(), numeric):
                  items.append("AIC: {}".format(self.aic()))
      items.extend(self._str_items_custom())
      return items
  
imports: from collections import OrderedDict
  from h2o.display import H2ODisplay, display, repr_def, format_to_html, format_to_multiline
  from h2o.utils.compatibility import *
  from h2o.utils.metaclass import backwards_compatibility, deprecated_fn, h2o_meta
  from h2o.utils.typechecks import is_type, numeric
label_desc: Use image node_id 5 for calling the MetricsBase obj's underlying member method code with example usage: obj._str_items(verbosity) and returns: items, str