class_docstr: Test class for fifth set of voting learner API tests.
class_docstr_tok: ["Test","class","for","fifth","set","of","voting","learner","API","tests","."]
code: def test_cross_validate_with_grid_search(self):
      for (
          learner_type,
          with_soft_voting,
          with_individual_predictions,
          with_custom_seed,
      ) in product(
          ["classifier", "regressor"],
          [False, True],
          [False, True],
          [False, True],
      ):
          # regressors do not support soft voting or custom seeds
          if learner_type == "regressor" and with_soft_voting:
              continue
          else:
              yield (
                  self.check_cross_validate_with_grid_search,
                  learner_type,
                  with_soft_voting,
                  with_individual_predictions,
                  with_custom_seed,
              )
  
file_path: skll/tests/test_voting_learners_api_5.py
imports: import unittest
  from itertools import product
  from pathlib import Path
  import numpy
  import pandas
  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
  from skll.data import FeatureSet
  from skll.learner.voting import VotingLearner
  from skll.utils.testing import compute_expected_folds_for_cv_testing, make_california_housing_data, make_digits_data, other_dir, output_dir
label_desc: Use image node_id 4 for calling the TestVotingLearnersAPIFive obj's underlying member method code with example usage: obj.test_cross_validate_with_grid_search() without return types