class_docstr: Test class for fourth set of voting learner API tests.
class_docstr_tok: ["Test","class","for","fourth","set","of","voting","learner","API","tests","."]
docstr: Test that voting learner cross validation fails with continuous labels.
docstr_tok: ["Test","that","voting","learner","cross","validation","fails","with","continuous","labels","."]
code: def test_cross_validate_with_continuous_labels(self):
      """Test that voting learner cross validation fails with continuous labels."""
      fs, _ = make_classification_data(
          num_examples=500,
          train_test_ratio=0.8,
          num_labels=3,
          non_negative=True,
      )
      fs.labels = fs.labels.astype(float) + 0.5
      voting_learner = VotingLearner(
          ["LogisticRegression", "SVC", "MultinomialNB"]
      )
      assert_raises_regex(
          ValueError,
          "must be encoded as strings",
          voting_learner.cross_validate,
          fs,
          grid_search=False,
      )
  
imports: import unittest
  from itertools import product
  from pathlib import Path
  import numpy
  import pandas
  from numpy.testing import assert_raises_regex
  from scipy.stats import pearsonr
  from sklearn.ensemble import VotingClassifier, VotingRegressor
  from sklearn.metrics import accuracy_score, f1_score, mean_squared_error
  from sklearn.model_selection import PredefinedSplit, cross_val_predict
  from skll.learner.voting import VotingLearner
  from skll.utils.testing import make_california_housing_data, make_classification_data, make_digits_data, other_dir, output_dir
label_desc: Use image node_id 3 for calling the TestVotingLearnersAPIFour obj's underlying member method code with example usage: obj.test_cross_validate_with_continuous_labels() without return types