From 5f9ba95cf98aa524318ebf80c9fa14002aaffb4d Mon Sep 17 00:00:00 2001 From: Bogdan Cebere Date: Tue, 20 Dec 2022 09:30:53 +0200 Subject: [PATCH] numpy fixes --- .../plugins/prediction/classifiers/plugin_random_forest.py | 2 -- .../prediction/regression/plugin_random_forest_regressor.py | 2 -- src/hyperimpute/version.py | 2 +- tests/integrations/test_sklearn.py | 4 ++-- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/hyperimpute/plugins/prediction/classifiers/plugin_random_forest.py b/src/hyperimpute/plugins/prediction/classifiers/plugin_random_forest.py index a5d4c80..12d5e59 100644 --- a/src/hyperimpute/plugins/prediction/classifiers/plugin_random_forest.py +++ b/src/hyperimpute/plugins/prediction/classifiers/plugin_random_forest.py @@ -49,7 +49,6 @@ def __init__( criterion: int = 0, max_features: int = 0, min_samples_split: int = 2, - bootstrap: bool = True, min_samples_leaf: int = 1, max_depth: Optional[int] = 3, random_state: int = 0, @@ -66,7 +65,6 @@ def __init__( max_features=RandomForestPlugin.features[max_features], min_samples_split=min_samples_split, max_depth=max_depth, - bootstrap=bootstrap, min_samples_leaf=min_samples_leaf, random_state=random_state, n_jobs=max(1, int(multiprocessing.cpu_count() / 2)), diff --git a/src/hyperimpute/plugins/prediction/regression/plugin_random_forest_regressor.py b/src/hyperimpute/plugins/prediction/regression/plugin_random_forest_regressor.py index 6aecf56..dfb2d60 100644 --- a/src/hyperimpute/plugins/prediction/regression/plugin_random_forest_regressor.py +++ b/src/hyperimpute/plugins/prediction/regression/plugin_random_forest_regressor.py @@ -49,7 +49,6 @@ def __init__( criterion: int = 0, max_features: int = 0, min_samples_split: int = 2, - bootstrap: bool = True, min_samples_leaf: int = 1, max_depth: Optional[int] = 3, hyperparam_search_iterations: Optional[int] = None, @@ -67,7 +66,6 @@ def __init__( max_features=RandomForestRegressionPlugin.features[max_features], min_samples_split=min_samples_split, max_depth=max_depth, - bootstrap=bootstrap, min_samples_leaf=min_samples_leaf, random_state=random_state, n_jobs=max(1, int(multiprocessing.cpu_count() / 2)), diff --git a/src/hyperimpute/version.py b/src/hyperimpute/version.py index 0365f9f..6b07f98 100644 --- a/src/hyperimpute/version.py +++ b/src/hyperimpute/version.py @@ -1,2 +1,2 @@ -__version__ = "0.1.11" +__version__ = "0.1.12" MAJOR_VERSION = "0.1" diff --git a/tests/integrations/test_sklearn.py b/tests/integrations/test_sklearn.py index b8fe08b..9d2e54f 100644 --- a/tests/integrations/test_sklearn.py +++ b/tests/integrations/test_sklearn.py @@ -29,8 +29,8 @@ def _eval_imputer_pipeline(test_imputer: str) -> None: n_missing_samples = int(np.floor(n_samples * missing_rate)) missing_samples = np.hstack( ( - np.zeros(n_samples - n_missing_samples, dtype=np.bool), - np.ones(n_missing_samples, dtype=np.bool), + np.zeros(n_samples - n_missing_samples, dtype=bool), + np.ones(n_missing_samples, dtype=bool), ) ) rng.shuffle(missing_samples)