class_docstr: Interpretation base class, can be inherited for task specific Interpretation classes
docstr: Construct interpretation object from a learner
docstr_tok: ["Construct","interpretation","object","from","a","learner"]
code: def from_learner(
      cls,
      learn,  # Model used to create interpretation
      ds_idx: int = 1,  # Index of `learn.dls` when `dl` is None
      dl: DataLoader = None,  # `Dataloader` used to make predictions
      act=None,  # Override default or set prediction activation function
  ):
      "Construct interpretation object from a learner"
      if dl is None:
          dl = learn.dls[ds_idx].new(shuffle=False, drop_last=False)
      _, _, losses = learn.get_preds(
          dl=dl,
          with_input=False,
          with_loss=True,
          with_decoded=False,
          with_preds=False,
          with_targs=False,
          act=act,
      )
      return cls(learn, dl, losses, act)
  
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 3 for calling the Interpretation obj's underlying member method code with example usage: obj.from_learner(cls, learn, ds_idx, dl, act) and returns: cls