class_docstr: Test DataVisualizer base class
class_docstr_tok: ["Test","DataVisualizer","base","class"]
docstr: Ensure classes are assigned correctly for label encoding
code: def test_classes_discrete(self):
      """
      Ensure classes are assigned correctly for label encoding
      """
      X, y = self.discrete
      classes = ["a", "b", "c", "d", "e"]
      oz = DataVisualizer(classes=classes, target_type="discrete").fit(
          X, y
      )
  
      npt.assert_array_equal(oz.classes_, classes)
      assert list(oz._colors.keys()) == classes
  
imports: import pytest
  import numpy
  import numpy.testing
  from tests.fixtures import Dataset
  from yellowbrick.base import Visualizer
  from yellowbrick.features.base import *
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.datasets import make_classification, make_regression
  from unittest.mock import Mock
label_desc: Use image node_id 9 for calling the TestDataVisualizer obj's underlying member method code with example usage: obj.test_classes_discrete() without return types