code: def conditional_entropy(p):
      # H(Y|X) where X corresponds to axis 0, Y to axis 1
      # i.e., How many bits of additional information are needed to where we are on axis 1 if we know where we are on axis 0?
      p = prob_normalize(p)
      y = np.sum(
          p, axis=0, keepdims=True
      )  # marginalize to calculate H(Y)
      return max(0.0, entropy(y) - mutual_information(p))
  
file_path: insightface/reconstruction/ostec/external/stylegan2/metrics/linear_separability.py
imports: from collections import defaultdict
  import numpy
  import sklearn.svm
  import tensorflow
  import dnnlib.tflib
  from metrics import metric_base
  from training import misc
label_desc: Use image node_id 4 for calling a global function with example usage: conditional_entropy(p) and returns: max