class_docstr: Unit test class for correctness of model predictions.
class_docstr_tok: ["Unit","test","class","for","correctness","of","model","predictions","."]
docstr: Unit test for predictions in SArray format.
docstr_tok: ["Unit","test","for","predictions","in","SArray","format","."]
code: def test_predict(self):
      """
      Unit test for predictions in SArray format.
      """
  
      ## Test that predictions are in an SArray.
      ystar = self.model.predict(self.sf[:1], verbose=False)
      self.assertEqual(type(ystar), tc.SArray)
  
      ## Test type of output is correct.
      ystar = self.model.predict(
          self.sf[:1], output_type="class", verbose=False
      )
      self.assertIs(ystar.dtype, str)
  
      ystar = self.model.predict(
          self.sf[:1], output_type="probability", verbose=False
      )
      self.assertIs(ystar.dtype, float)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import copy
  import array
  import numpy
  import turicreate
  from .None import util
  from turicreate.util import _assert_sframe_equal
  from turicreate.toolkits._main import ToolkitError
  import sys
label_desc: Use image node_id 4 for calling the KnnClassifierPredictTest obj's underlying member method code with example usage: obj.test_predict() without return types