class_docstr: Test ClassBalance visualizer
class_docstr_tok: ["Test","ClassBalance","visualizer"]
docstr: A value error should be raised on invalid train or test target
docstr_tok: ["A","value","error","should","be","raised","on","invalid","train","or","test","target"]
code: def test_invalid_target(self):
      """
      A value error should be raised on invalid train or test target
      """
      y_valid = np.random.randint(2, size=100)
      y_invalid = np.random.uniform(size=100)
  
      oz = ClassBalance()
  
      with pytest.raises(YellowbrickValueError):
          oz.fit(y_invalid)
  
      with pytest.raises(YellowbrickValueError):
          oz.fit(y_valid, y_invalid)
  
imports: import pytest
  from yellowbrick.target.class_balance import *
  from yellowbrick.datasets import load_occupancy
  from yellowbrick.exceptions import YellowbrickValueError
  from tests.fixtures import Dataset, Split
  from tests.base import VisualTestCase
  from sklearn.datasets import make_classification
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 2 for calling the TestClassBalance obj's underlying member method code with example usage: obj.test_invalid_target() without return types