class_docstr: Test creation of the Kmeans model with various parameter and dataset
  configurations.
docstr: Test that the batch size parameter is dealt with correctly, including
  the choice of training method, re-sizing of 'batch_size', and existence
  of complete results.
code: def test_batch_size(self):
      """
      Test that the batch size parameter is dealt with correctly, including
      the choice of training method, re-sizing of 'batch_size', and existence
      of complete results.
      """
  
      ## Typical usage
      m = tc.kmeans.create(
          self.sf,
          num_clusters=self.K,
          batch_size=self.n / 5,
          max_iterations=10,
          verbose=False,
      )
      self.assertEqual(m.method, "minibatch")
      self.assertEqual(m.batch_size, self.n / 5)
      self.assertEqual(m.max_iterations, 10)
      self.assertEqual(m.cluster_id.num_rows(), self.n)
      self.assertEqual(m.cluster_info.num_rows(), self.K)
  
      ## Larger batch size than number of examples
      m = tc.kmeans.create(
          self.sf,
          num_clusters=self.K,
          batch_size=2 * self.n,
          max_iterations=10,
          verbose=False,
      )
      self.assertEqual(m.method, "elkan")
      self.assertEqual(m.batch_size, self.n)
      self.assertEqual(m.max_iterations, 10)
      self.assertEqual(m.cluster_id.num_rows(), self.n)
      self.assertEqual(m.cluster_info.num_rows(), self.K)
  
      ## Very small number of examples
      n, K = 6, 2
      sf = make_clustering_data(n=n, d=self.dim, seed=11)
      m = tc.kmeans.create(
          sf, num_clusters=2, batch_size=10, verbose=False
      )
  
      self.assertEqual(m.method, "elkan")
      self.assertEqual(m.batch_size, n)
      self.assertEqual(m.max_iterations, 10)
      self.assertEqual(m.cluster_id.num_rows(), n)
      self.assertEqual(m.cluster_info.num_rows(), K)
  
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 8 for calling the KmeansCreateTest obj's underlying member method code with example usage: obj.test_batch_size() without return types