From c5379afd17725f29afb6f93a66f895f71848ec6f Mon Sep 17 00:00:00 2001 From: Daniele Ongari Date: Tue, 9 Jul 2024 20:37:16 +0200 Subject: [PATCH] Release v0.7 (#115) * test on py310 * test on py39 * fix deprecated base_estimator * bump version --- .github/workflows/docbuild.yml | 2 +- .github/workflows/pythonpackage.yml | 2 +- README.md | 2 -- examples/plot_mpg_svr.py | 2 +- forestci/tests/test_forestci.py | 2 +- forestci/version.py | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docbuild.yml b/.github/workflows/docbuild.yml index 4fe99f7..b21f431 100644 --- a/.github/workflows/docbuild.yml +++ b/.github/workflows/docbuild.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7] + python-version: [3.9] steps: - name: Checkout repo diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 71cdeec..65ae410 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7, 3.8] + python-version: [3.9] steps: - uses: actions/checkout@v1 diff --git a/README.md b/README.md index e369f32..764a5be 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,6 @@ implemented in scikit-learn random forest regression or classification objects. The core functions calculate an in-bag and error bars for random forest objects. -Compatible with Python2.7 and Python3.6 - This module is based on R code from Stefan Wager (see important links below) and is licensed under the MIT open source license (see [LICENSE](LICENSE)) diff --git a/examples/plot_mpg_svr.py b/examples/plot_mpg_svr.py index 070cf77..2b687e1 100644 --- a/examples/plot_mpg_svr.py +++ b/examples/plot_mpg_svr.py @@ -39,7 +39,7 @@ # Create RandomForestRegressor n_estimators = 1000 mpg_bagger = BaggingRegressor( - base_estimator=SVR(), n_estimators=n_estimators, random_state=42 + estimator=SVR(), n_estimators=n_estimators, random_state=42 ) mpg_bagger.fit(mpg_X_train, mpg_y_train) mpg_y_hat = mpg_bagger.predict(mpg_X_test) diff --git a/forestci/tests/test_forestci.py b/forestci/tests/test_forestci.py index 32d8beb..f6754b4 100644 --- a/forestci/tests/test_forestci.py +++ b/forestci/tests/test_forestci.py @@ -91,7 +91,7 @@ def test_bagging_svr_error(): X_train = X[train_idx] n_trees = 4 - bagger = BaggingRegressor(base_estimator=SVR(), n_estimators=n_trees) + bagger = BaggingRegressor(estimator=SVR(), n_estimators=n_trees) bagger.fit(X_train, y_train) inbag = fci.calc_inbag(X_train.shape[0], bagger) for ib in [inbag, None]: diff --git a/forestci/version.py b/forestci/version.py index 14b9f91..d1794ed 100644 --- a/forestci/version.py +++ b/forestci/version.py @@ -2,7 +2,7 @@ _version_major = 0 _version_minor = 7 _version_micro = '' # use '' for first of series, number for 1 and above -_version_extra = 'dev' +_version_extra = '' # _version_extra = '' # Uncomment this for full releases # Construct full version string from these.