class_docstr: Standard classification evaluation.
  
  Args:
      config: a :class:`SimpleClassificationEvaluationConfig`
class_docstr_tok: ["Standard","classification","evaluation",".","Args",":","config",":","a",":","class",":","`","SimpleClassificationEvaluationConfig","`"]
code: def evaluate_samples(
      self, samples, eval_key=None, classes=None, missing=None
  ):
      pred_field = self.config.pred_field
      gt_field = self.config.gt_field
      is_frame_field = samples._is_frame_field(gt_field)
  
      gt = gt_field + ".label"
      gt_id = gt_field + ".id"
      pred = pred_field + ".label"
      pred_id = pred_field + ".id"
      pred_conf = pred_field + ".confidence"
  
      ytrue, ytrue_ids, ypred, ypred_ids, confs = samples.values(
          [gt, gt_id, pred, pred_id, pred_conf]
      )
  
      if is_frame_field:
          ytrue = list(itertools.chain.from_iterable(ytrue))
          ytrue_ids = list(itertools.chain.from_iterable(ytrue_ids))
          ypred = list(itertools.chain.from_iterable(ypred))
          ypred_ids = list(itertools.chain.from_iterable(ypred_ids))
          confs = list(itertools.chain.from_iterable(confs))
  
      results = ClassificationResults(
          samples,
          self.config,
          eval_key,
          ytrue,
          ypred,
          confs=confs,
          ytrue_ids=ytrue_ids,
          ypred_ids=ypred_ids,
          classes=classes,
          missing=missing,
          backend=self,
      )
  
      if eval_key is None:
          return results
  
      if is_frame_field:
          eval_frame = samples._FRAMES_PREFIX + eval_key
          gt = gt[len(samples._FRAMES_PREFIX) :]
          pred = pred[len(samples._FRAMES_PREFIX) :]
  
          # Sample-level accuracies
          samples.set_field(
              eval_key,
              F("frames").map((F(gt) == F(pred)).to_double()).mean(),
          ).save(eval_key)
  
          # Per-frame accuracies
          samples.set_field(eval_frame, F(gt) == F(pred)).save(
              eval_frame
          )
      else:
          # Per-sample accuracies
          samples.set_field(eval_key, F(gt) == F(pred)).save(eval_key)
  
      return results
  
imports: from copy import deepcopy
  import inspect
  import itertools
  import warnings
  import numpy
  import sklearn.metrics
  import eta.core.utils
  import fiftyone
  import fiftyone.core.evaluation
  from fiftyone.core.expressions import ViewField
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.plots
  import fiftyone.core.utils
  import fiftyone.core.validation
  from .base import BaseEvaluationResults
label_desc: Use image node_id 2 for calling the SimpleEvaluation obj's underlying member method code with example usage: obj.evaluate_samples(samples, eval_key, classes, missing) and returns: results, results