class_docstr: Object returned by explainers
class_docstr_tok: ["Object","returned","by","explainers"]
docstr: Returns examples covered by the anchor.
  Args:
      only_different_prediction(bool): if true, will only return examples
      where the anchor  makes a different prediction than the original
      model
      only_same_prediction(bool): if true, will only return examples
      where the anchor makes the same prediction than the original
      model
      partial_index (int): lets you get the examples from the partial
      anchor until a certain index.
docstr_tok: ["Returns","examples","covered","by","the","anchor",".","Args",":","only_different_prediction","(","bool",")",":","if","true",",","will","only","return","examples","where","the","anchor","makes","a","different","prediction","than","the","original","model","only_same_prediction","(","bool",")",":","if","true",",","will","only","return","examples","where","the","anchor","makes","the","same","prediction","than","the","original","model","partial_index","(","int",")",":","lets","you","get","the","examples","from","the","partial","anchor","until","a","certain","index","."]
code: def examples(
      self,
      only_different_prediction=False,
      only_same_prediction=False,
      partial_index=None,
  ):
      """
      Returns examples covered by the anchor.
      Args:
          only_different_prediction(bool): if true, will only return examples
          where the anchor  makes a different prediction than the original
          model
          only_same_prediction(bool): if true, will only return examples
          where the anchor makes the same prediction than the original
          model
          partial_index (int): lets you get the examples from the partial
          anchor until a certain index.
      """
      if only_different_prediction and only_same_prediction:
          print(
              "Error: you can't have only_different_prediction \
  and only_same_prediction at the same time"
          )
          return []
      key = "covered"
      if only_different_prediction:
          key = "covered_false"
      if only_same_prediction:
          key = "covered_true"
      size = len(self.exp_map["examples"])
      idx = partial_index if partial_index is not None else size - 1
      if idx < 0 or idx > size:
          return []
      return self.exp_map["examples"][idx][key]
  
file_path: anchor/anchor/anchor_explanation.py
imports: from __future__ import print_function
  import io
label_desc: Use image node_id 6 for calling the AnchorExplanation obj's underlying member method code with example usage: obj.examples(only_different_prediction, only_same_prediction, partial_index) and returns: self, list, list