code: def test_validate_with_test_data_regression_error_filter_validations(
      self,
  ):
      test_data_regression = get_toy_regression_dataset()
  
      cohort_filter_regression = CohortFilter(
          method=CohortFilterMethods.METHOD_LESS,
          arg=[2.5],
          column=CohortFilter.REGRESSION_ERROR,
      )
  
      with pytest.raises(
          UserConfigValidationException,
          match="Error cannot be configured for classification"
          " scenarios.",
      ):
          cohort_filter_regression._validate_with_test_data(
              test_data=test_data_regression,
              target_column="target",
              categorical_features=[],
              is_classification=True,
          )
  
      with pytest.raises(
          UserConfigValidationException,
          match="Error cannot be configured with either includes"
          " or excludes.",
      ):
          cohort_filter_regression.method = (
              CohortFilterMethods.METHOD_INCLUDES
          )
          cohort_filter_regression._validate_with_test_data(
              test_data=test_data_regression,
              target_column="target",
              categorical_features=[],
              is_classification=False,
          )
  
      with pytest.raises(
          UserConfigValidationException,
          match="Error cannot be configured with either includes"
          " or excludes.",
      ):
          cohort_filter_regression.method = (
              CohortFilterMethods.METHOD_EXCLUDES
          )
          cohort_filter_regression._validate_with_test_data(
              test_data=test_data_regression,
              target_column="target",
              categorical_features=[],
              is_classification=False,
          )
  
      with pytest.raises(
          UserConfigValidationException,
          match="All entries in arg should be of type int or float"
          " for Error cohort.",
      ):
          cohort_filter_regression.method = (
              CohortFilterMethods.METHOD_GREATER
          )
          cohort_filter_regression.arg = ["val1", "val2"]
          cohort_filter_regression._validate_with_test_data(
              test_data=test_data_regression,
              target_column="target",
              categorical_features=[],
              is_classification=False,
          )
  
imports: import json
  import pandas
  import pytest
  from raiutils.cohort import ClassificationOutcomes, Cohort, CohortFilter, CohortFilterMethods, cohort_filter_json_converter
  from raiutils.exceptions import UserConfigValidationException
label_desc: Use image node_id 4 for calling the TestCohortFilterDataValidations obj's underlying member method code with example usage: obj.test_validate_with_test_data_regression_error_filter_validations() without return types