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: Computes classification metrics for the results, including accuracy,
  precision, recall, and F-beta score.
  
  See :func:`sklearn:sklearn.metrics.precision_recall_fscore_support` for
  details.
  
  Args:
      classes (None): an optional list of classes to include in the
          calculations
      average ("micro"): the averaging strategy to use
      beta (1.0): the F-beta value to use
  
  Returns:
      a dict
docstr_tok: ["Computes","classification","metrics","for","the","results",",","including","accuracy",",","precision",",","recall",",","and","F-beta","score",".","See",":","func",":","`","sklearn",":","sklearn.metrics.precision_recall_fscore_support","`","for","details",".","Args",":","classes","(","None",")",":","an","optional","list","of","classes","to","include","in","the","calculations","average","(","``","micro","''",")",":","the","averaging","strategy","to","use","beta","(","1.0",")",":","the","F-beta","value","to","use","Returns",":","a","dict"]
code: def metrics(self, classes=None, average="micro", beta=1.0):
      """Computes classification metrics for the results, including accuracy,
      precision, recall, and F-beta score.
  
      See :func:`sklearn:sklearn.metrics.precision_recall_fscore_support` for
      details.
  
      Args:
          classes (None): an optional list of classes to include in the
              calculations
          average ("micro"): the averaging strategy to use
          beta (1.0): the F-beta value to use
  
      Returns:
          a dict
      """
      labels = self._parse_classes(classes)
  
      accuracy = _compute_accuracy(
          self.ytrue, self.ypred, labels=labels, weights=self.weights
      )
  
      (
          precision,
          recall,
          fscore,
          _,
      ) = skm.precision_recall_fscore_support(
          self.ytrue,
          self.ypred,
          average=average,
          labels=labels,
          beta=beta,
          sample_weight=self.weights,
          zero_division=0,
      )
  
      support = _compute_support(
          self.ytrue, labels=labels, weights=self.weights
      )
  
      return {
          "accuracy": accuracy,
          "precision": precision,
          "recall": recall,
          "fscore": fscore,
          "support": support,
      }
  
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 3 for calling the BaseEvaluationResults obj's underlying member method code with example usage: obj.metrics(classes, average, beta) and returns: dict