code: def class_mean_errors_one_class(prediction, y, significance, c=0):
      """Calculates the average error rate of a conformal classification model,
      considering only test examples belonging to class ``c``. Use
      ``functools.partial`` in order to test other classes.
      """
      labels, y = np.unique(y, return_inverse=True)
      prediction = prediction > significance
      idx = np.arange(0, y.size, 1)[y == c]
      errs = np.sum(
          1 for _ in filter(lambda x: not prediction[x, c], idx)
      )
  
      if idx.size > 0:
          return errs / idx.size
      else:
          return 0
  
file_path: lightwood/lightwood/analysis/nc/metrics.py
imports: import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: class_mean_errors_one_class(prediction, y, significance, c) and returns: unknown, int