class_docstr: ```
  predicts image classes
  ```
class_docstr_tok: ["``","`","predicts","image","classes","``","`"]
docstr: ```
  Highlights image to explain prediction
  ```
docstr_tok: ["``","`","Highlights","image","to","explain","prediction","``","`"]
code: def explain(self, img_fpath):
      """
      ```
      Highlights image to explain prediction
      ```
      """
      try:
          import eli5
      except:
          msg = (
              "ktrain requires a forked version of eli5 to support tf.keras. "
              + "Install with: pip install https://github.com/amaiya/eli5-tf/archive/refs/heads/master.zip"
          )
          warnings.warn(msg)
          return
  
      if not DISABLE_V2_BEHAVIOR:
          warnings.warn(
              "Please add os.environ['DISABLE_V2_BEHAVIOR'] = '1' at top of your script or notebook."
          )
          msg = (
              "\nFor image classification, the explain method currently requires disabling V2 behavior in TensorFlow 2.\n"
              + "Please add the following to the top of your script or notebook BEFORE you import ktrain and restart Colab runtime or Jupyter kernel:\n\n"
              + "import os\n"
              + "os.environ['DISABLE_V2_BEHAVIOR'] = '1'\n"
          )
          print(msg)
          return
  
      img = keras.preprocessing.image.load_img(
          img_fpath,
          target_size=self.preproc.target_size,
          color_mode=self.preproc.color_mode,
      )
      x = keras.preprocessing.image.img_to_array(img)
      x = np.expand_dims(x, axis=0)
      return eli5.show_prediction(self.model, x)
  
file_path: ktrain/ktrain/vision/predictor.py
imports: from ..None import utils
  from ..imports import *
  from ..predictor import Predictor
  from .preprocessor import ImagePreprocessor
label_desc: Use image node_id 3 for calling the ImagePredictor obj's underlying member method code with example usage: obj.explain(img_fpath) and returns: eli5