docstr: Check that evaluation does not require the test data to span all labels.
docstr_tok: ["Check","that","evaluation","does","not","require","the","test","data","to","span","all","labels","."]
code: def test_evaluate_with_incomplete_targets(self):
      """
      Check that evaluation does not require the test data to span all labels.
      """
  
      # Arbitrarily filter out all rows whose label matches the first row's.
      filtered_label = self.data[self.target][0]
      filtered_data = self.data[
          self.data[self.target] != filtered_label
      ]
  
      # Run evaluation.
      evaluation = self.model.evaluate(filtered_data)
  
      # Verify that all metrics were computed and included in the result.
      for metric in [
          "accuracy",
          "auc",
          "precision",
          "recall",
          "f1_score",
          "log_loss",
          "confusion_matrix",
          "roc_curve",
      ]:
          self.assertIn(metric, evaluation)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import turicreate
  import random
  import tempfile
  import math
  import numpy
  from numbers import Number
  from .None import util
  import pytest
  from turicreate.toolkits._internal_utils import _mac_ver
  from turicreate.toolkits._main import ToolkitError
  import uuid
label_desc: Use image node_id 11 for calling the ActivityClassifierTest obj's underlying member method code with example usage: obj.test_evaluate_with_incomplete_targets() without return types