class_docstr: A GP to be used in multi-fidelity settings. 
class_docstr_tok: ["A","GP","to","be","used","in","multi-fidelity","settings","."]
docstr: Gets a string format of the kernel depending on whether it is SE/Poly. 
docstr_tok: ["Gets","a","string","format","of","the","kernel","depending","on","whether","it","is","SE\/Poly","."]
code: def _get_kernel_str(cls, kern):
      """Gets a string format of the kernel depending on whether it is SE/Poly."""
      if isinstance(kern, gp_kernel.ExpDecayKernel):
          ret = "expd: offs=%0.3f, pow=%s" % (
              kern.hyperparams["offset"],
              get_list_of_floats_as_str(kern.hyperparams["powers"]),
          )
      elif isinstance(kern, gp_kernel.SEKernel) or isinstance(
          kern, gp_kernel.MaternKernel
      ):
          hp_name = "dim_bandwidths"
          kern_name = (
              "se"
              if isinstance(kern, gp_kernel.SEKernel)
              else "matern(%0.1f)" % (kern.hyperparams["nu"])
          )
          if kern.dim > 4:
              ret = "%0.4f(avg)" % (kern.hyperparams[hp_name].mean())
          else:
              ret = get_list_of_floats_as_str(kern.hyperparams[hp_name])
          ret = kern_name + ": " + ret
      elif isinstance(kern, gp_kernel.PolyKernel):
          ret = "poly: %s" % (
              get_list_of_floats_as_str(
                  kern.hyperparams["dim_scalings"]
              )
          )
      else:  # Return an empty string.
          ret = str(kern)
      return ret
  
imports: from __future__ import division
  from .None import kernel
  from .gp_core import GP, GPFitter, mandatory_gp_args
  from ..utils.option_handler import load_options
  from ..utils.reporters import get_reporter
  from ..utils.ancillary_utils import get_list_of_floats_as_str
label_desc: Use image node_id 12 for calling the MFGP obj's underlying member method code with example usage: obj._get_kernel_str(cls, kern) and returns: ret