class_docstr: K-Elbow Visualizer Tests
class_docstr_tok: ["K-Elbow","Visualizer","Tests"]
docstr: Test no exceptions for mini-batch kmeans k-elbow visualizer
code: def test_integrated_mini_batch_kmeans_elbow(self):
      """
      Test no exceptions for mini-batch kmeans k-elbow visualizer
      """
      # NOTE #182: cannot use occupancy dataset because of memory usage
  
      # Generate a blobs data set
      X, y = make_blobs(
          n_samples=1000,
          n_features=12,
          centers=6,
          shuffle=True,
          random_state=42,
      )
  
      try:
          _, ax = plt.subplots()
  
          visualizer = KElbowVisualizer(
              MiniBatchKMeans(random_state=42), k=4, ax=ax
          )
          visualizer.fit(X)
          visualizer.finalize()
  
          self.assert_images_similar(visualizer)
      except Exception as e:
          pytest.fail("error during k-elbow: {}".format(e))
  
imports: import sys
  import pytest
  import numpy
  import matplotlib.pyplot
  from scipy.sparse import csc_matrix, csr_matrix
  from numpy.testing import assert_array_almost_equal
  from sklearn.datasets import make_blobs
  from sklearn.cluster import KMeans, MiniBatchKMeans
  from sklearn.feature_extraction.text import TfidfVectorizer
  from tests.fixtures import Dataset
  from tests.base import VisualTestCase
  from yellowbrick.datasets import load_hobbies
  from yellowbrick.cluster.elbow import distortion_score
  from yellowbrick.cluster.elbow import KElbowVisualizer, kelbow_visualizer
  from yellowbrick.exceptions import YellowbrickValueError, YellowbrickWarning
  from tests.base import IS_WINDOWS_OR_CONDA
label_desc: Use image node_id 2 for calling the TestKElbowVisualizer obj's underlying member method code with example usage: obj.test_integrated_mini_batch_kmeans_elbow() without return types