class_docstr: Class to contain the data from elpd information criterion like waic or loo.
class_docstr_tok: ["Class","to","contain","the","data","from","elpd","information","criterion","like","waic","or","loo","."]
docstr: Print elpd data in a user friendly way.
docstr_tok: ["Print","elpd","data","in","a","user","friendly","way","."]
code: def __str__(self):
      """Print elpd data in a user friendly way."""
      kind = self.index[0].split("_")[1]
  
      if kind not in ("loo", "waic"):
          raise ValueError("Invalid ELPDData object")
  
      scale_str = SCALE_DICT[self["scale"]]
      padding = len(scale_str) + len(kind) + 1
      base = BASE_FMT.format(padding, padding - 2)
      base = base.format(
          "",
          kind=kind,
          scale=scale_str,
          n_samples=self.n_samples,
          n_points=self.n_data_points,
          *self.values,
      )
  
      if self.warning:
          base += "\n\nThere has been a warning during the calculation. Please check the results."
  
      if kind == "loo" and "pareto_k" in self:
          bins = np.asarray([-np.Inf, 0.5, 0.7, 1, np.Inf])
          counts, *_ = _histogram(self.pareto_k.values, bins)
          extended = POINTWISE_LOO_FMT.format(
              max(4, len(str(np.max(counts))))
          )
          extended = extended.format(
              "Count",
              "Pct.",
              *[*counts, *(counts / np.sum(counts) * 100)],
          )
          base = "\n".join([base, extended])
      return base
  
imports: import warnings
  from collections.abc import Sequence
  from copy import copy
  from copy import deepcopy
  import numpy
  import pandas
  from scipy.fftpack import next_fast_len
  from scipy.interpolate import CubicSpline
  from scipy.stats.mstats import mquantiles
  from xarray import apply_ufunc
  from ..None import _log
  from ..utils import conditional_jit, conditional_vect, conditional_dask
  from .density_utils import histogram
label_desc: Use image node_id 1 for calling the ELPDData obj's underlying member method code with example usage: obj.__str__() and returns: base