class_docstr: MissingValuesDispersion visualizer
class_docstr_tok: ["MissingValuesDispersion","visualizer"]
docstr: Integration test of visualizer with pandas with y targets
docstr_tok: ["Integration","test","of","visualizer","with","pandas","with","y","targets"]
code: def test_missingvaluesdispersion_with_pandas_with_y_targets(self):
      """
      Integration test of visualizer with pandas with y targets
      """
      X, y = make_classification(
          n_samples=400,
          n_features=20,
          n_informative=8,
          n_redundant=8,
          n_classes=2,
          n_clusters_per_class=4,
          random_state=854,
      )
  
      # add nan values to a range of values in the matrix
      X[X > 1.5] = np.nan
  
      X_ = pd.DataFrame(X)
      features = [str(n) for n in range(20)]
      classes = ["Class A", "Class B"]
      viz = MissingValuesDispersion(features=features, classes=classes)
      viz.fit(X_, y=y)
      viz.finalize()
  
      self.assert_images_similar(viz, tol=self.tol)
  
file_path: yellowbrick/tests/test_contrib/test_missing/test_dispersion.py
imports: import os
  import pytest
  from sklearn.datasets import make_classification
  from tests.base import VisualTestCase
  from yellowbrick.contrib.missing.dispersion import *
label_desc: Use image node_id 2 for calling the TestMissingValuesDispersion obj's underlying member method code with example usage: obj.test_missingvaluesdispersion_with_pandas_with_y_targets() without return types