Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kasyanovse committed Aug 10, 2023
1 parent 442fad8 commit 0888f6d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/advanced/automl/h2o_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down
3 changes: 1 addition & 2 deletions fedot/core/optimisers/objective/data_source_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
3 changes: 2 additions & 1 deletion test/unit/data/test_data_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 0888f6d

Please sign in to comment.