class_docstr: Decision List Classifier
  
  Currently a slight variant of SkopeRules from skope-rules.
  https://github.com/scikit-learn-contrib/skope-rules
docstr: Provides local explanations for provided instances.
  
  Args:
      X: Numpy array for X to explain.
      y: Numpy vector for y to explain.
      name: User-defined explanation name.
  
  Returns:
      An explanation object.
docstr_tok: ["Provides","local","explanations","for","provided","instances",".","Args",":","X",":","Numpy","array","for","X","to","explain",".","y",":","Numpy","vector","for","y","to","explain",".","name",":","User-defined","explanation","name",".","Returns",":","An","explanation","object","."]
code: def explain_local(self, X, y=None, name=None):
      """Provides local explanations for provided instances.
  
      Args:
          X: Numpy array for X to explain.
          y: Numpy vector for y to explain.
          name: User-defined explanation name.
  
      Returns:
          An explanation object.
      """
  
      check_is_fitted(self, "has_fitted_")
  
      if name is None:
          name = gen_name_from_class(self)
  
      n_samples = None
      if y is not None:
          y = clean_dimensions(y, "y")
          if y.ndim != 1:
              raise ValueError("y must be 1 dimensional")
          n_samples = len(y)
  
          y = typify_classification(y)
  
      X, n_samples = preclean_X(
          X, self.feature_names_in_, self.feature_types_in_, n_samples
      )
  
      # predict and predict_proba call unify_data already, so call them before unifying
      # but after doing the light cleaning for iterators
      outcomes = self.predict(X)
      predictions = self.predict_proba(X)
  
      X, _, _ = unify_data(
          X,
          n_samples,
          self.feature_names_in_,
          self.feature_types_in_,
          False,
          0,
      )
  
      scores = self._scores(X)
  
      perf_dicts = gen_perf_dicts(predictions, y, True, self.classes_)
      data_dicts = []
      for idx, score in enumerate(scores):
          data_dict = {
              "type": "rule",
              "rule": [self.rules_[score]],
              "precision": [self.prec_[score]],
              "recall": [self.recall_[score]],
              "outcome": [outcomes[idx]],
          }
          perf_dict_obj = (
              None if perf_dicts is None else perf_dicts[idx]
          )
          data_dict["perf"] = perf_dict_obj
          data_dicts.append(data_dict)
  
      internal_obj = {"overall": None, "specific": data_dicts}
      selector = gen_local_selector(data_dicts, is_classification=True)
  
      return RulesExplanation(
          "local",
          internal_obj,
          feature_names=self.feature_names_in_,
          feature_types=self.feature_types_in_,
          name=name,
          selector=selector,
      )
  
imports: from itertools import count
  from sklearn.base import ClassifierMixin
  from sklearn.utils.validation import check_is_fitted
  from ..api.base import ExplainerMixin, ExplanationMixin
  from ..utils._explanation import gen_name_from_class, gen_global_selector, gen_local_selector, gen_perf_dicts
  from copy import deepcopy
  import numpy
  import pandas
  import re
  from ..utils._clean_x import preclean_X
  from ..utils._clean_simple import clean_dimensions, typify_classification
  from ..utils._unify_data import unify_data
  import logging
label_desc: Use image node_id 7 for calling the DecisionListClassifier obj's underlying member method code with example usage: obj.explain_local(X, y, name) and returns: RulesExplanation