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 grow function for IREP*
  
  Parameters
  ----------
  pos : np.ndarray
      Positive instances
  neg : np.ndarray
      Negative instances
  predefined_rule: const int64_t[::1]
      Existing rules
  
  Returns
  -------
  list
      Learned rule
docstr_tok: ["The","grow","function","for","IREP","*","Parameters","--","--","--","--","--","pos",":","np.ndarray","Positive","instances","neg",":","np.ndarray","Negative","instances","predefined_rule",":","const","int64_t","[",":",":1","]","Existing","rules","Returns","--","--","--","-","list","Learned","rule"]
code: def _grow_rule(self, pos, neg, predefined_rule=None):
      """
      The grow function for IREP*
  
      Parameters
      ----------
      pos : np.ndarray
          Positive instances
      neg : np.ndarray
          Negative instances
      predefined_rule: const int64_t[::1]
          Existing rules
  
      Returns
      -------
      list
          Learned rule
      """
      _validate_grow_rule_input(pos)
      neg = _filter_contradicted_instances(pos, neg)
  
      if predefined_rule is not None:
          pos = _bind_rule(pos, predefined_rule)
          neg = _bind_rule(neg, predefined_rule)
  
          # the length of pos must be always positive
          if len(pos) == 0 or len(neg) == 0:
              return predefined_rule
  
          learned_rule = list(predefined_rule)
      else:
          learned_rule = list()
  
      while len(neg) > 0:
          pos = np.asfortranarray(pos)
          neg = np.asfortranarray(neg)
  
          best_literal_index = _find_best_literal(
              pos,
              neg,
              self._condition_mat[0],
              self._condition_mat[1],
              self._condition_mat[2],
              self._condition_mat[3],
          )
          literal = Literal(
              self._condition_mat[0][best_literal_index],
              self._condition_mat[1][best_literal_index],
              self._condition_mat[2][best_literal_index],
              self._condition_mat[3][best_literal_index],
          )
  
          append_literal(learned_rule, literal)
          pos = _bind_literal(
              pos,
              literal.name,
              literal.op,
              literal.num_val,
              literal.nom_val,
          )
          neg = _bind_literal(
              neg,
              literal.name,
              literal.op,
              literal.num_val,
              literal.nom_val,
          )
      return learned_rule
  
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 14 for calling the RipperExplainer obj's underlying member method code with example usage: obj._grow_rule(pos, neg, predefined_rule) and returns: learned_rule, predefined_rule