class_docstr: Test creation of the Kmeans model with various parameter and dataset
  configurations.
docstr: Ensure error trapping works correctly for unacceptable parameter values
  and types.
code: def test_bogus_parameters(self):
      """
      Ensure error trapping works correctly for unacceptable parameter values
      and types.
      """
      ## Bad values for the number of clusters
      for k in [0, -1, "fossa", 3.5]:
          with self.assertRaises(ToolkitError):
              m = tc.kmeans.create(
                  dataset=self.sf, num_clusters=k, verbose=False
              )
  
      with self.assertRaises(ValueError):
          m = tc.kmeans.create(
              dataset=self.sf, num_clusters=self.n + 1, verbose=False
          )
  
      ## Bad values for max_iterations
      for max_iter in [-1, "fossa", 3.5]:
          with self.assertRaises(ToolkitError):
              m = tc.kmeans.create(
                  dataset=self.sf,
                  num_clusters=self.K,
                  max_iterations=max_iter,
                  verbose=False,
              )
  
      ## Bad values for batch_size
      for batch_size in [-1, 0, "fossa", 3.5]:
          with self.assertRaises(ToolkitError):
              m = tc.kmeans.create(
                  dataset=self.sf,
                  num_clusters=self.K,
                  batch_size=batch_size,
                  verbose=False,
              )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import copy
  import numpy
  from numpy.testing import assert_allclose
  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 KmeansCreateTest obj's underlying member method code with example usage: obj.test_bogus_parameters() without return types