code: def conditional_entropy_calc(classes, table, P, POP):
      """
      Calculate Conditional entropy.
  
      :param classes: confusion matrix classes
      :type classes: list
      :param table: input confusion matrix
      :type table: dict
      :param P: number of actual positives per class
      :type P: dict
      :param POP: population or total number of samples per class
      :type POP: dict
      :return: conditional entropy as float
      """
      try:
          result = 0
          for i in classes:
              temp = 0
              for j in classes:
                  p_prime = 0
                  if P[i] != 0:
                      p_prime = table[i][j] / P[i]
                  if p_prime != 0:
                      temp += p_prime * math.log(p_prime, 2)
              result += temp * (P[i] / POP[i])
          return -result
      except Exception:
          return "None"
  
imports: from __future__ import division
  import math
  import operator
  from functools import reduce
  from .pycm_interpret import *
  from .pycm_ci import kappa_SE_calc, CI_calc, SE_calc
  from .pycm_util import complement
label_desc: Use image node_id 26 for calling a global function with example usage: conditional_entropy_calc(classes, table, P, POP) and returns: unknown, str