code: def _get_avg_classification_error(Y1, Y2):
      """Return the classification error."""
      if len(Y1) != len(Y2):
          raise ValueError(
              "Lenghts of Y1 (%d), and Y2 (%d) should be the same."
              % (len(Y1), len(Y2))
          )
      num_data = float(len(Y1))
      unequal_posns = [y1 != y2 for (y1, y2) in zip(Y1, Y2)]
      ret = sum(unequal_posns) / num_data
      if not np.isfinite(ret):
          ret = 1.0
      return ret
  
file_path: dragonfly/examples/tree_reg/skltree.py
imports: from __future__ import print_function
  import numpy
  from sklearn import ensemble
label_desc: Use image node_id 3 for calling a global function with example usage: _get_avg_classification_error(Y1, Y2) and returns: ret