Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default number of cv_folds is changed to 5 #865

Merged
merged 4 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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