class_docstr: Jointly trains 2 surrogate decision trees.
  Refines diff (or sim) regions by sample generation.
docstr: y_predict is a boolean array representing the split.
docstr_tok: ["y_predict","is","a","boolean","array","representing","the","split","."]
code: def get_entropy_split(self, y_predict, y_real, mode="entropy"):
      """
      y_predict is a boolean array representing the split.
      """
      assert len(y_predict) == len(
          y_real
      ), f"length differs in labels! {len(y_predict)} != {len(y_real)}"
  
      y_left = y_real[y_predict]
      y_right = y_real[~y_predict]
  
      n_l = y_left.shape[0]
      n_r = y_right.shape[0]
  
      n = n_l + n_r
      p_left = n_l / n
      p_right = n_r / n
  
      return p_left * self.H(y_left, mode) + p_right * self.H(
          y_right, mode
      )
  
imports: import numpy
  import pandas
  from aix360.algorithms.imd.rule import Rule
label_desc: Use image node_id 3 for calling the JointSurrogateTree obj's underlying member method code with example usage: obj.get_entropy_split(y_predict, y_real, mode) and returns: unknown