class_docstr: Interpretation base class, can be inherited for task specific Interpretation classes
docstr: Show `k` largest(/smallest) preds and losses. Implementation based on type dispatch
docstr_tok: ["Show","`","k","`","largest","(","\/smallest",")","preds","and","losses",".","Implementation","based","on","type","dispatch"]
code: def plot_top_losses(
      self,
      k: int | MutableSequence,  # Number of losses to plot
      largest: bool = True,  # Sort losses by largest or smallest
      **kwargs,
  ):
      "Show `k` largest(/smallest) preds and losses. Implementation based on type dispatch"
      if is_listy(k) or isinstance(k, range):
          losses, idx = (o[k] for o in self.top_losses(None, largest))
      else:
          losses, idx = self.top_losses(k, largest)
      inps, preds, targs, decoded, _ = self[idx]
      inps, targs, decoded = (
          tuplify(inps),
          tuplify(targs),
          tuplify(decoded),
      )
      x, y, its = self.dl._pre_show_batch(inps + targs, max_n=len(idx))
      x1, y1, outs = self.dl._pre_show_batch(
          inps + decoded, max_n=len(idx)
      )
      if its is not None:
          plot_top_losses(
              x,
              y,
              its,
              outs.itemgot(slice(len(inps), None)),
              preds,
              losses,
              **kwargs,
          )
  
imports: from __future__ import annotations
  from .data.all import *
  from .optimizer import *
  from .learner import *
  from .tabular.core import *
  import sklearn.metrics
label_desc: Use image node_id 5 for calling the Interpretation obj's underlying member method code with example usage: obj.plot_top_losses(k, largest) without return types