class_docstr: Class that stores the results of a segmentation evaluation.
  
  Args:
      samples: the :class:`fiftyone.core.collections.SampleCollection` used
      config: the :class:`SegmentationEvaluationConfig` used
      eval_key: the evaluation key
      pixel_confusion_matrix: a pixel value confusion matrix
      classes: a list of class labels corresponding to the confusion matrix
      missing (None): a missing (background) class
      backend (None): a :class:`SegmentationEvaluation` backend
class_docstr_tok: ["Class","that","stores","the","results","of","a","segmentation","evaluation",".","Args",":","samples",":","the",":","class",":","`","fiftyone.core.collections.SampleCollection","`","used","config",":","the",":","class",":","`","SegmentationEvaluationConfig","`","used","eval_key",":","the","evaluation","key","pixel_confusion_matrix",":","a","pixel","value","confusion","matrix","classes",":","a","list","of","class","labels","corresponding","to","the","confusion","matrix","missing","(","None",")",":","a","missing","(","background",")","class","backend","(","None",")",":","a",":","class",":","`","SegmentationEvaluation","`","backend"]
code: def _parse_confusion_matrix(confusion_matrix, classes):
      ytrue = []
      ypred = []
      weights = []
      nrows, ncols = confusion_matrix.shape
      for i in range(nrows):
          for j in range(ncols):
              cij = confusion_matrix[i, j]
              if cij > 0:
                  ytrue.append(classes[i])
                  ypred.append(classes[j])
                  weights.append(cij)
  
      return ytrue, ypred, weights
  
imports: from copy import deepcopy
  import logging
  import inspect
  import warnings
  import numpy
  import sklearn.metrics
  import eta.core.image
  import eta.core.utils
  import fiftyone
  import fiftyone.core.evaluation
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.utils
  import fiftyone.core.validation
  from .base import BaseEvaluationResults
label_desc: Use image node_id 5 for calling the SegmentationResults obj's underlying member method code with example usage: obj._parse_confusion_matrix(confusion_matrix, classes) and returns: ytrue,  ypred,  weights