class_docstr: RIPPER (Repeated Incremental Pruning to Produce Error Reduction) is a heuristic rule induction algorithm
  based on separate-and-conquer. The explainer outputs a rule set in Disjunctive Normal Form (DNF) for a single
  target concept.
  
  References:
      .. [#ML95] `William W Cohen, "Fast Effective Rule Induction"
          Machine Learning: Proceedings of the Twelfth International Conference, 1995.
          <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.107.2612&rep=rep1&type=pdf>
class_docstr_tok: ["RIPPER","(","Repeated","Incremental","Pruning","to","Produce","Error","Reduction",")","is","a","heuristic","rule","induction","algorithm","based","on","separate-and-conquer",".","The","explainer","outputs","a","rule","set","in","Disjunctive","Normal","Form","(","DNF",")","for","a","single","target","concept",".","References",":","..","[","#","ML95","]","`","William","W","Cohen",",","``","Fast","Effective","Rule","Induction","''","Machine","Learning",":","Proceedings","of","the","Twelfth","International","Conference",",","1995",".","<","http",":","\/\/citeseerx.ist.psu.edu\/viewdoc\/download","?","doi=10.1.1.107.2612","&","rep=rep1","&","type=pdf",">"]
docstr: The predict function for RIPPER algorithm. Its implementation is limited to DataFrame and Series because the
  RIPPER algorithm needs the information of feature name and have to support nominal data type
  
  Args:
      X (pd.DataFrame): DataFrame of features
  
  Returns:
      np.array: predicted labels
docstr_tok: ["The","predict","function","for","RIPPER","algorithm",".","Its","implementation","is","limited","to","DataFrame","and","Series","because","the","RIPPER","algorithm","needs","the","information","of","feature","name","and","have","to","support","nominal","data","type","Args",":","X","(","pd.DataFrame",")",":","DataFrame","of","features","Returns",":","np.array",":","predicted","labels"]
code: def predict(self, X: DataFrame) -> np.ndarray:
      """
      The predict function for RIPPER algorithm. Its implementation is limited to DataFrame and Series because the
      RIPPER algorithm needs the information of feature name and have to support nominal data type
  
      Args:
          X (pd.DataFrame): DataFrame of features
  
      Returns:
          np.array: predicted labels
      """
      test = X.copy()
      encode_nominal(self._nominal_column_encoders, test)
      result_vec = [None for _ in range(len(test))]
  
      input_arr = test.to_numpy(dtype=np.dtype(float))
  
      result = {
          label: _rule_list_predict(input_arr, self._rule_map[label])
          for label in self._rule_map.keys()
      }
  
      for label in self._rule_map.keys():
          for i in range(len(result_vec)):
              if result_vec[i] is None and result[label][i]:
                  result_vec[i] = label
  
      return np.array(
          [
              res if res is not None else self.default_label
              for res in result_vec
          ]
      )
  
imports: import logging
  import logging.config
  from collections import OrderedDict
  import numpy
  from aix360.algorithms.dise import DISExplainer
  from aix360.algorithms.rule_induction.ripper.base import _encoding_for_parallel, init_encoder, encode_nominal, _split_instances
  from aix360.algorithms.rule_induction.ripper.binding import append_literal, _bind_literal, _bind_rule, unbound_rule_list_index, _unbound, _unbound_rule_list, _rule_list_predict, LE, EQ, _find_best_literal, Literal, _filter_contradicted_instances
  from aix360.algorithms.rule_induction.ripper.mdl import _mdl
  from aix360.algorithms.rule_induction.ripper.pruning import _pruning_irep, _minimize_rule_list, _pruning_optimization
  from aix360.algorithms.rule_induction.trxf.core.conjunction import Conjunction
  from aix360.algorithms.rule_induction.trxf.core.dnf_ruleset import DnfRuleSet
  from aix360.algorithms.rule_induction.trxf.core.feature import Feature
  from aix360.algorithms.rule_induction.trxf.core.predicate import Predicate, Relation
  from pandas import DataFrame, Series
label_desc: Use image node_id 5 for calling the RipperExplainer obj's underlying member method code with example usage: obj.predict(X) and returns: np