class_docstr: Base class for evaluation results.
  
  Args:
      samples: the :class:`fiftyone.core.collections.SampleCollection` used
      config: the :class:`fiftyone.core.evaluation.EvaluationMethodConfig`
          used
      eval_key: the evaluation key
      ytrue: a list of ground truth labels
      ypred: a list of predicted labels
      confs (None): an optional list of confidences for the predictions
      weights (None): an optional list of sample weights
      ytrue_ids (None): a list of IDs for the ground truth labels
      ypred_ids (None): a list of IDs for the predicted labels
      classes (None): the list of possible classes. If not provided, the
          observed ground truth/predicted labels are used
      missing (None): a missing label string. Any None-valued labels are
          given this label for evaluation purposes
      samples (None): the :class:`fiftyone.core.collections.SampleCollection`
          for which the results were computed
      backend (None): a :class:`fiftyone.core.evaluation.EvaluationMethod`
          backend
class_docstr_tok: ["Base","class","for","evaluation","results",".","Args",":","samples",":","the",":","class",":","`","fiftyone.core.collections.SampleCollection","`","used","config",":","the",":","class",":","`","fiftyone.core.evaluation.EvaluationMethodConfig","`","used","eval_key",":","the","evaluation","key","ytrue",":","a","list","of","ground","truth","labels","ypred",":","a","list","of","predicted","labels","confs","(","None",")",":","an","optional","list","of","confidences","for","the","predictions","weights","(","None",")",":","an","optional","list","of","sample","weights","ytrue_ids","(","None",")",":","a","list","of","IDs","for","the","ground","truth","labels","ypred_ids","(","None",")",":","a","list","of","IDs","for","the","predicted","labels","classes","(","None",")",":","the","list","of","possible","classes",".","If","not","provided",",","the","observed","ground","truth\/predicted","labels","are","used","missing","(","None",")",":","a","missing","label","string",".","Any","None-valued","labels","are","given","this","label","for","evaluation","purposes","samples","(","None",")",":","the",":","class",":","`","fiftyone.core.collections.SampleCollection","`","for","which","the","results","were","computed","backend","(","None",")",":","a",":","class",":","`","fiftyone.core.evaluation.EvaluationMethod","`","backend"]
docstr: Generates a classification report for the results via
  :func:`sklearn:sklearn.metrics.classification_report`.
  
  Args:
      classes (None): an optional list of classes to include in the
          report
  
  Returns:
      a dict
docstr_tok: ["Generates","a","classification","report","for","the","results","via",":","func",":","`","sklearn",":","sklearn.metrics.classification_report","`",".","Args",":","classes","(","None",")",":","an","optional","list","of","classes","to","include","in","the","report","Returns",":","a","dict"]
code: def report(self, classes=None):
      """Generates a classification report for the results via
      :func:`sklearn:sklearn.metrics.classification_report`.
  
      Args:
          classes (None): an optional list of classes to include in the
              report
  
      Returns:
          a dict
      """
      labels = self._parse_classes(classes)
  
      if self.ytrue.size == 0 or labels.size == 0:
          d = {}
          empty = {
              "precision": 0.0,
              "recall": 0.0,
              "f1-score": 0.0,
              "support": 0,
          }
  
          if labels.size > 0:
              for label in labels:
                  d[label] = empty.copy()
  
          d["micro avg"] = empty.copy()
          d["macro avg"] = empty.copy()
          d["weighted avg"] = empty.copy()
          return d
  
      return skm.classification_report(
          self.ytrue,
          self.ypred,
          labels=labels,
          sample_weight=self.weights,
          output_dict=True,
          zero_division=0,
      )
  
file_path: fiftyone/fiftyone/utils/eval/base.py
imports: import itertools
  import numpy
  import sklearn.metrics
  import fiftyone.core.evaluation
  import fiftyone.core.plots
label_desc: Use image node_id 2 for calling the BaseEvaluationResults obj's underlying member method code with example usage: obj.report(classes) and returns: skm, d