diff --git a/examples/advanced/automl/h2o_example.py b/examples/advanced/automl/h2o_example.py index f4a0a9d3f4..b16712734a 100644 --- a/examples/advanced/automl/h2o_example.py +++ b/examples/advanced/automl/h2o_example.py @@ -73,7 +73,7 @@ def h2o_regression_pipeline_evaluation(): train_data, test_data = train_test_data_setup(data) pipeline.fit(input_data=train_data) - results = pipeline.predict(input_data=test_data) + _ = pipeline.predict(input_data=test_data) _, rmse_on_test = get_rmse_value(pipeline, train_data, test_data) print(f"RMSE {rmse_on_test}") diff --git a/fedot/core/optimisers/objective/data_source_splitter.py b/fedot/core/optimisers/objective/data_source_splitter.py index cd36ad2c9c..e3cd1160a2 100644 --- a/fedot/core/optimisers/objective/data_source_splitter.py +++ b/fedot/core/optimisers/objective/data_source_splitter.py @@ -36,7 +36,7 @@ def __init__(self, cv_folds: Optional[int] = None, validation_blocks: Optional[int] = None, split_ratio: Optional[float] = None, - shuffle: bool = True, + shuffle: bool = False, stratify: bool = True, random_seed: int = 42): self.cv_folds = cv_folds @@ -152,7 +152,6 @@ def _propose_cv_folds_and_validation_blocks(self, data): f" ({test_shape}) defined by split ratio." f" Split ratio is changed to {self.split_ratio}.")) test_share = 1 - self.split_ratio - self.split_ratio = self.split_ratio else: test_share = 1 / (self.cv_folds + 1) self.validation_blocks = int(data_shape * test_share // forecast_length) diff --git a/test/unit/data/test_data_split.py b/test/unit/data/test_data_split.py index 712173452a..8415ecfcbf 100644 --- a/test/unit/data/test_data_split.py +++ b/test/unit/data/test_data_split.py @@ -203,7 +203,8 @@ def test_multivariate_time_series_splitting_correct(): @pytest.mark.parametrize(('datas_funs', 'cv_folds', 'shuffle', 'stratify'), - [# classification + stratify + shuffle + cv_folds + [ + # classification + stratify + shuffle + cv_folds ([partial(get_tabular_classification_data, 100, 5)] * 3, 4, True, True), # classification + shuffle + cv_folds ([partial(get_tabular_classification_data, 100, 5)] * 3, 4, True, False),