code: def test_classification_results_missing_data():
      ytrue = [
          "cat",
          "cat",
          "cat",
          "dog",
          "dog",
          "dog",
          "fox",
          "fox",
          "fox",
      ]
      ypred = [
          "cat",
          "dog",
          None,
          "dog",
          "fox",
          None,
          "fox",
          "cat",
          None,
      ]
  
      samples = []
      for i, (yt, yp) in enumerate(zip(ytrue, ypred)):
          sample = fo.Sample(
              filepath="image%d.jpg" % i,
              ground_truth=fo.Classification(label=yt),
              predictions=fo.Classification(label=yp),
          )
          samples.append(sample)
  
      dataset = fo.Dataset()
      dataset.add_samples(samples)
  
      results = dataset.evaluate_classifications("predictions")
  
      # No row for "missing" GT labels, since these entires represent false
      # positive predictions
      results.print_report()
  
      # Data includes missing GT/preds, so includes a "none" row/column when
      # plotting confusion matrix
      plot = results.plot_confusion_matrix()
      plot.show()
  
      classes = ["cat", "dog"]
  
      # Shows per-class metrics for only `cat` and `dog` classes, but other
      # predictions when GT=cat/dog are taken into account for P/R/F1 scores
      results.print_report(classes=classes)
  
      # Shows per-class metrics for only `cat` and `dog` classes, but other
      # predictions when GT=cat/dog are taken into account for P/R/F1 scores
      plot = results.plot_confusion_matrix(classes=classes)
      plot.show()
  
      # Only include `cat` and `dog` rows (GT) and columns (predictions)
      plot = results.plot_confusion_matrix(
          classes=classes, include_other=False
      )
      plot.show()
  
      input("Press enter to continue...")
  
file_path: fiftyone/tests/intensive/evaluation_tests.py
imports: import random
  import unittest
  import numpy
  import eta.core.utils
  import pytest
  import fiftyone
  import fiftyone.zoo
  from fiftyone import ViewField
label_desc: Use image node_id 11 for calling a global function with example usage: test_classification_results_missing_data() without return types