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 learning phase of RIPPER.
  
  Args:
      pos (np.ndarray): Positive instances
      neg (np.ndarray): Negative instances
      d (int): The number to bit that a new rule need to gain
      ratio (float): The percentage of pruning data
      pruning_threshold (int): The minimum number of instances for splitting
  
  Returns:
      list: Rule list learned using IREP algorithm
docstr_tok: ["The","learning","phase","of","RIPPER",".","Args",":","pos","(","np.ndarray",")",":","Positive","instances","neg","(","np.ndarray",")",":","Negative","instances","d","(","int",")",":","The","number","to","bit","that","a","new","rule","need","to","gain","ratio","(","float",")",":","The","percentage","of","pruning","data","pruning_threshold","(","int",")",":","The","minimum","number","of","instances","for","splitting","Returns",":","list",":","Rule","list","learned","using","IREP","algorithm"]
code: def _irep_plus_outer_loop(
      self,
      pos: np.ndarray,
      neg: np.ndarray,
      d: int,
      ratio: float = 2 / 3,
      pruning_threshold: int = 20,
  ):
      """
      The learning phase of RIPPER.
  
      Args:
          pos (np.ndarray): Positive instances
          neg (np.ndarray): Negative instances
          d (int): The number to bit that a new rule need to gain
          ratio (float): The percentage of pruning data
          pruning_threshold (int): The minimum number of instances for splitting
  
      Returns:
          list: Rule list learned using IREP algorithm
      """
      neg = _filter_contradicted_instances(pos, neg)
      n = self._gain_n
  
      rules = []
  
      # TODO verify if the intent was to make a copy of the value instead of the reference
      pos_original = pos
      neg_original = neg
  
      dl_min = _mdl(pos, neg, rules, n)
  
      while len(pos) > 0:
          if len(pos) > pruning_threshold:
              (
                  pos_grow,
                  pos_prune,
                  neg_grow,
                  neg_prune,
              ) = _split_instances(pos, neg, ratio, self.random_state)
              rule = self._grow_rule(pos_grow, neg_grow)
              rule = _pruning_irep(pos_prune, neg_prune, rule)
          else:
              rule = self._grow_rule(pos, neg)
  
          rules.append(rule)
          dl_new = _mdl(pos, neg, rules, n)
  
          if dl_new > dl_min + d:
              return _minimize_rule_list(
                  pos_original, neg_original, rules, n
              )
          else:
              if dl_new < dl_min:
                  dl_min = dl_new
              pos = _unbound(pos, rule)
              neg = _unbound(neg, rule)
  
      return rules
  
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 8 for calling the RipperExplainer obj's underlying member method code with example usage: obj._irep_plus_outer_loop(pos, neg, d, ratio, pruning_threshold) and returns: rules, _minimize_rule_list