class_docstr: Multilabel confusion matrix class.
  
  >>> mlcm = MultiLabelCM([{'dog'}, {'cat', 'dog'}], [{'cat'}, {'cat'}])
  >>> mlcm.actual_vector_multihot
  [[0, 1], [1, 1]]
  >>> mlcm.predict_vector_multihot
  [[1, 0], [1, 0]]
docstr: Return confusion matrices based on classes.
  
  :param class_name: target class name for confusion matrix
  :type class_name: any valid type
  :return: confusion matrix corresponding to the given class name
docstr_tok: ["Return","confusion","matrices","based","on","classes",".",":","param","class_name",":","target","class","name","for","confusion","matrix",":","type","class_name",":","any","valid","type",":","return",":","confusion","matrix","corresponding","to","the","given","class","name"]
code: def get_cm_by_class(self, class_name):
      """
      Return confusion matrices based on classes.
  
      :param class_name: target class name for confusion matrix
      :type class_name: any valid type
      :return: confusion matrix corresponding to the given class name
      """
      if class_name not in self.classwise_cms:
          try:
              class_index = self.classes.index(class_name)
          except ValueError:
              raise pycmMultiLabelError(INVALID_CLASS_NAME_ERROR)
          actual_vector_temp = []
          predict_vector_temp = []
          for item1, item2 in zip(
              self.actual_vector_multihot, self.predict_vector_multihot
          ):
              actual_vector_temp.append(item1[class_index])
              predict_vector_temp.append(item2[class_index])
          cm = ConfusionMatrix(
              actual_vector_temp,
              predict_vector_temp,
              sample_weight=self.weights,
          )
          self.classwise_cms[class_name] = cm
          return cm
      return self.classwise_cms[class_name]
  
file_path: pycm/pycm/pycm_multilabel_cm.py
imports: from __future__ import division
  from .pycm_error import pycmVectorError, pycmMultiLabelError
  from .pycm_param import *
  from .pycm_obj import ConfusionMatrix
  import numpy
label_desc: Use image node_id 2 for calling the MultiLabelCM obj's underlying member method code with example usage: obj.get_cm_by_class(class_name) and returns: self, cm