Skip to content

Commit

Permalink
Default number of cv_folds is changed to 5 (#865)
Browse files Browse the repository at this point in the history
* changed default cv_folds number in params and some tests
  • Loading branch information
andreygetmanov authored Sep 8, 2022
1 parent 6487966 commit c8eed58
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/unit/composer/test_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def test_collect_intermediate_metric(pipeline: Pipeline, input_data: InputData,


@pytest.mark.parametrize("cv_generator, data",
[(partial(tabular_cv_generator, folds=3),
[(partial(tabular_cv_generator, folds=5),
get_classification_data()),
(partial(ts_cv_generator, folds=3, validation_blocks=2),
get_ts_data()[0])])
Expand Down
2 changes: 1 addition & 1 deletion test/unit/optimizer/test_data_objective_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_pipeline_objective_evaluate_with_empty_pipeline(classification_dataset)
def test_pipeline_objective_evaluate_with_cv_fold(classification_dataset):
pipeline = sample_pipeline()

cv_fold = partial(tabular_cv_generator, classification_dataset, folds=3)
cv_fold = partial(tabular_cv_generator, classification_dataset, folds=5)
metric = ClassificationMetricsEnum.logloss

objective_eval = PipelineObjectiveEvaluate(Objective(metric), cv_fold)
Expand Down
6 changes: 3 additions & 3 deletions test/unit/validation/test_table_cv.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_classification_data():
def test_cv_multiple_metrics_evaluated_correct(classification_dataset):
pipeline = sample_pipeline()

cv_folds = partial(tabular_cv_generator, classification_dataset, folds=3)
cv_folds = partial(tabular_cv_generator, classification_dataset, folds=5)
metrics = [ClassificationMetricsEnum.ROCAUC_penalty,
ClassificationMetricsEnum.accuracy,
ClassificationMetricsEnum.logloss]
Expand Down Expand Up @@ -80,7 +80,7 @@ def test_cv_min_kfolds_raise():


def test_tuner_cv_classification_correct():
folds = 2
folds = 5
dataset = get_iris_data()

simple_pipeline = pipeline_simple()
Expand All @@ -105,7 +105,7 @@ def test_composer_with_cv_optimization_correct():
composer_requirements = PipelineComposerRequirements(primary=available_model_types,
secondary=available_model_types,
timeout=timedelta(minutes=0.2),
num_of_generations=2, cv_folds=3,
num_of_generations=2, cv_folds=5,
show_progress=False)

builder = ComposerBuilder(task).with_requirements(composer_requirements).with_metrics(metric_function)
Expand Down
2 changes: 1 addition & 1 deletion test/unit/validation/test_time_series_cv.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_ts_cv_generator_correct():
""" Checks if the split into training and test for time series cross
validation is correct
By default, the number of validation blocks for each fold is three
By default, the number of validation blocks for each fold is five
"""
folds = 2
forecast_len, validation_blocks, time_series = configure_experiment()
Expand Down

0 comments on commit c8eed58

Please sign in to comment.