class_docstr: Confusion matrix class.
  
  >>> y_actu = [2, 0, 2, 2, 0, 1, 1, 2, 2, 0, 1, 2]
  >>> y_pred = [0, 0, 2, 1, 0, 2, 1, 0, 2, 0, 2, 2]
  >>> cm = ConfusionMatrix(y_actu, y_pred)
  >>> cm.classes
  [0, 1, 2]
  >>> cm.table
  {0: {0: 3, 1: 0, 2: 0}, 1: {0: 0, 1: 1, 2: 2}, 2: {0: 2, 1: 1, 2: 3}}
  >>> cm2 = ConfusionMatrix(matrix={"Class1": {"Class1": 1, "Class2": 2}, "Class2": {"Class1": 0, "Class2": 5}})
  >>> cm2
  pycm.ConfusionMatrix(classes: ['Class1', 'Class2'])
class_docstr_tok: ["Confusion","matrix","class",".",">",">",">","y_actu","=","[","2",",","0",",","2",",","2",",","0",",","1",",","1",",","2",",","2",",","0",",","1",",","2","]",">",">",">","y_pred","=","[","0",",","0",",","2",",","1",",","0",",","2",",","1",",","0",",","2",",","0",",","2",",","2","]",">",">",">","cm","=","ConfusionMatrix","(","y_actu",",","y_pred",")",">",">",">","cm.classes","[","0",",","1",",","2","]",">",">",">","cm.table","{","0",":","{","0",":","3",",","1",":","0",",","2",":","0","}",",","1",":","{","0",":","0",",","1",":","1",",","2",":","2","}",",","2",":","{","0",":","2",",","1",":","1",",","2",":","3","}","}",">",">",">","cm2","=","ConfusionMatrix","(","matrix=","{","``","Class1","''",":","{","``","Class1","''",":","1",",","``","Class2","''",":","2","}",",","``","Class2","''",":","{","``","Class1","''",":","0",",","``","Class2","''",":","5","}","}",")",">",">",">","cm2","pycm.ConfusionMatrix","(","classes",":","[","'Class1","'",",","'Class2","'","]",")"]
docstr: Save ConfusionMatrix in csv file.
  
  :param name: filename
  :type name: str
  :param address: flag for address return
  :type address: bool
  :param class_param: class parameters list for save, Example: ["TPR", "TNR", "AUC"]
  :type class_param: list
  :param class_name: class name (subset of classes names), Example: [1, 2, 3]
  :type class_name: list
  :param matrix_save: save matrix flag
  :type matrix_save: bool
  :param normalize: save normalize matrix flag
  :type normalize: bool
  :param summary: summary mode flag
  :type summary: bool
  :param header: add headers to csv file
  :type header: bool
  :return: saving address as dict {"Status":bool, "Message":str}
code: def save_csv(
      self,
      name,
      address=True,
      class_param=None,
      class_name=None,
      matrix_save=True,
      normalize=False,
      summary=False,
      header=False,
  ):
      """
      Save ConfusionMatrix in csv file.
  
      :param name: filename
      :type name: str
      :param address: flag for address return
      :type address: bool
      :param class_param: class parameters list for save, Example: ["TPR", "TNR", "AUC"]
      :type class_param: list
      :param class_name: class name (subset of classes names), Example: [1, 2, 3]
      :type class_name: list
      :param matrix_save: save matrix flag
      :type matrix_save: bool
      :param normalize: save normalize matrix flag
      :type normalize: bool
      :param summary: summary mode flag
      :type summary: bool
      :param header: add headers to csv file
      :type header: bool
      :return: saving address as dict {"Status":bool, "Message":str}
      """
      try:
          class_list = class_param
          if summary:
              class_list = SUMMARY_CLASS
          message = None
          classes = class_filter(self.classes, class_name)
          csv_file = open(name + ".csv", "w", encoding="utf-8")
          csv_data = csv_print(
              classes, self.class_stat, self.digit, class_list
          )
          csv_file.write(csv_data)
          if matrix_save:
              matrix = self.table
              if normalize:
                  matrix = self.normalized_table
              csv_matrix_file = open(
                  name + "_matrix" + ".csv", "w", encoding="utf-8"
              )
              csv_matrix_data = csv_matrix_print(
                  self.classes, matrix, header=header
              )
              csv_matrix_file.write(csv_matrix_data)
          if address:
              message = os.path.join(
                  os.getcwd(), name + ".csv"
              )  # pragma: no cover
          return {"Status": True, "Message": message}
      except Exception as e:
          return {"Status": False, "Message": str(e)}
  
imports: from __future__ import division
  from .pycm_error import pycmVectorError, pycmMatrixError, pycmCIError, pycmAverageError, pycmPlotError
  from .pycm_handler import __class_stat_init__, __overall_stat_init__
  from .pycm_handler import __obj_assign_handler__, __obj_file_handler__, __obj_matrix_handler__, __obj_vector_handler__, __obj_array_handler__
  from .pycm_handler import __imbalancement_handler__
  from .pycm_class_func import F_calc, IBA_calc, TI_calc, NB_calc, sensitivity_index_calc
  from .pycm_overall_func import weighted_kappa_calc, weighted_alpha_calc, alpha2_calc, brier_score_calc, log_loss_calc
  from .pycm_distance import DistanceType, DISTANCE_MAPPER
  from .pycm_output import *
  from .pycm_util import *
  from .pycm_param import *
  from .pycm_ci import __CI_overall_handler__, __CI_class_handler__
  import os
  import json
  import numpy
  from warnings import warn
label_desc: Use image node_id 11 for calling the ConfusionMatrix obj's underlying member method code with example usage: obj.save_csv(name, address, class_param, class_name, matrix_save, normalize, summary, header) and returns: dict, dict