From patchwork Sat Mar 30 12:30:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 62375 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5D95427BBEA; Sat, 30 Mar 2024 12:32:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 86D4727BBE2 for ; Sat, 30 Mar 2024 12:32:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqXsV-0003oE-8j; Sat, 30 Mar 2024 08:32:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqXsQ-0003ma-IZ for guix-patches@gnu.org; Sat, 30 Mar 2024 08:32:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqXsO-000721-8Y for guix-patches@gnu.org; Sat, 30 Mar 2024 08:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqXsP-0005GG-Pz for guix-patches@gnu.org; Sat, 30 Mar 2024 08:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70089] [PATCH] gnu: python-scikit-optimize: Update to 0.10.1. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Mar 2024 12:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70089 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70089@debbugs.gnu.org Cc: Vinicius Monego X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171180190020156 (code B ref -1); Sat, 30 Mar 2024 12:32:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Mar 2024 12:31:40 +0000 Received: from localhost ([127.0.0.1]:44150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqXs3-0005F1-D0 for submit@debbugs.gnu.org; Sat, 30 Mar 2024 08:31:40 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqXs0-0005ED-Rh for submit@debbugs.gnu.org; Sat, 30 Mar 2024 08:31:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqXrq-0003eK-5H for guix-patches@gnu.org; Sat, 30 Mar 2024 08:31:26 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqXrm-0006wo-Kf for guix-patches@gnu.org; Sat, 30 Mar 2024 08:31:25 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 74A4D240103 for ; Sat, 30 Mar 2024 13:31:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711801880; bh=BycCXxHWYsT4V11qB78Y1llzsjAm21y1UJzlXq1qBX0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=Ay/Wfwh4Y7rBjAzg56RAY0t2rjj94hJ5STtrvv/OayoeQvJKXqLdJlRFk7epCcMya fH0O3WFPedbBL/mZ2W6OODlC2/vCYzdphrva20MsfGHrTg10soR/XQ1dhqqTQdtlO/ ttiaYl80T9h30q+hZeHyv9ZffRrDVHGWFhiUrUg+wyk1q41D0BXurG0pQ/i/HLyhkQ ZCn9kSk1wZk1FkebPlnMf9V57vjjBDGjvDowbaTCic2Un+4tUV93xedOUoIdPjdWok XpfnwM4JmUjqF0mUHIybaXLAi7RJKZuhmK5oYArEoDH35IQ4pto1NxKwLSXn28VFV6 ICZAUk7W5MVJg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V6Gpv1DNnz9rxD; Sat, 30 Mar 2024 13:31:18 +0100 (CET) From: Vinicius Monego Date: Sat, 30 Mar 2024 12:30:52 +0000 Message-Id: MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.66; envelope-from=monego@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-science.scm (python-scikit-optimize): Update to 0.10.1. [source]: Switch to maintained repository. Remove compatibility patches and snippet. * gnu/packages/patches/python-scikit-optimize-1148.patch, gnu/packages/patches/python-scikit-optimize-1148.patch: Remove files. * gnu/local.mk (dist_patch_DATA): Remove them. Change-Id: I6c23c93d3c256b0b97166f80eaeab7f2c7282c5f --- scikit-optimize was archived by upstream without explanation. One of the (ex) maintainers forked the project and is updating it, seems to be a one man project, but again no annoucement. I noticed that the PyPI page for this package is now held by this new repo. Is it safe to merge? gnu/local.mk | 2 - .../patches/python-scikit-optimize-1148.patch | 32 -- .../patches/python-scikit-optimize-1150.patch | 275 ------------------ gnu/packages/python-science.scm | 19 +- 4 files changed, 3 insertions(+), 325 deletions(-) delete mode 100644 gnu/packages/patches/python-scikit-optimize-1148.patch delete mode 100644 gnu/packages/patches/python-scikit-optimize-1150.patch base-commit: a17976e975001d3e95c998f1196a39bbb432de4f prerequisite-patch-id: 35b1bce8404aa9b122774f343fbde6b1accb6a33 prerequisite-patch-id: c0c840125378b58dddfeb89491c36a0ffcd34d90 prerequisite-patch-id: 6307ea85cee71834b4e3b8d362025c19d5144177 prerequisite-patch-id: e49db0ce706076aafa11c84cbe27a017531f7a98 prerequisite-patch-id: dc8571a1261a53ba90ae37dcebe79bc99630e661 prerequisite-patch-id: 1462b7d670025fea8e66ed6290a994e62035ef5d prerequisite-patch-id: 3e713b03abf25cc015c33e810b179af1c0b42804 prerequisite-patch-id: 920528da46d1621c15c5a6f10464c7ae5cde4003 prerequisite-patch-id: 7a94347b316fc5e4f20f51fe2ddeb097c3cae79f prerequisite-patch-id: 098696bf90a9e1b3e6237ae8c647b63d3bed8c6e prerequisite-patch-id: 84cc8b92fa6e1e0491a5f7ca020d13c662d3d3be prerequisite-patch-id: c56fb6c601a1014b6ba876b8d601449e535ea7b5 prerequisite-patch-id: 5971911f2fe36d93c11c11ec878495033dec14cf prerequisite-patch-id: 6e1fecd20a532eca97a9ea044765186159f6551e prerequisite-patch-id: 1ad8cb8f6e5ccfb35b32ea20a1c2f0b25de08b6b prerequisite-patch-id: 9a72f1e2eda3506da18d209bd83c0a45adeadfe3 diff --git a/gnu/local.mk b/gnu/local.mk index f2b480bded..3d45b8f573 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1947,8 +1947,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-robotframework-source-date-epoch.patch \ %D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \ %D%/packages/patches/python-scikit-bio-1887.patch \ - %D%/packages/patches/python-scikit-optimize-1148.patch \ - %D%/packages/patches/python-scikit-optimize-1150.patch \ %D%/packages/patches/python-typing-inspect-fix.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ diff --git a/gnu/packages/patches/python-scikit-optimize-1148.patch b/gnu/packages/patches/python-scikit-optimize-1148.patch deleted file mode 100644 index 6ad854ab1e..0000000000 --- a/gnu/packages/patches/python-scikit-optimize-1148.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 3a5d5eb90ec9d8d4905c05387748486157cadbbb Mon Sep 17 00:00:00 2001 -From: valtron -Date: Tue, 14 Feb 2023 09:56:10 -0700 -Subject: [PATCH] `np.int` -> `int` - -`np.int is int` and it was deprecated in numpy 1.20: https://numpy.org/doc/1.20/release/1.20.0-notes.html#deprecations ---- - skopt/space/transformers.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/skopt/space/transformers.py b/skopt/space/transformers.py -index 68892952..f2dfb164 100644 ---- a/skopt/space/transformers.py -+++ b/skopt/space/transformers.py -@@ -259,7 +259,7 @@ def transform(self, X): - if (self.high - self.low) == 0.: - return X * 0. - if self.is_int: -- return (np.round(X).astype(np.int) - self.low) /\ -+ return (np.round(X).astype(int) - self.low) /\ - (self.high - self.low) - else: - return (X - self.low) / (self.high - self.low) -@@ -272,7 +272,7 @@ def inverse_transform(self, X): - raise ValueError("All values should be greater than 0.0") - X_orig = X * (self.high - self.low) + self.low - if self.is_int: -- return np.round(X_orig).astype(np.int) -+ return np.round(X_orig).astype(int) - return X_orig - - diff --git a/gnu/packages/patches/python-scikit-optimize-1150.patch b/gnu/packages/patches/python-scikit-optimize-1150.patch deleted file mode 100644 index 0cdf361a80..0000000000 --- a/gnu/packages/patches/python-scikit-optimize-1150.patch +++ /dev/null @@ -1,275 +0,0 @@ -From cd74e00d0e4f435d548444e1a5edc20155e371d7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20T=C3=B8rnes?= -Date: Wed, 15 Feb 2023 18:47:52 +0100 -Subject: [PATCH 1/5] Update RandomForesetRegressor criterion to be inline with - scikit-learn change from mse to squared error this has the same funcitonality - ---- - requirements.txt | 6 +++--- - setup.py | 6 +++--- - skopt/learning/forest.py | 30 +++++++++++++++--------------- - 3 files changed, 21 insertions(+), 21 deletions(-) - -diff --git a/requirements.txt b/requirements.txt -index 1eaa3083a..23ab3d856 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -1,6 +1,6 @@ --numpy>=1.13.3 --scipy>=0.19.1 --scikit-learn>=0.20 -+numpy>=1.23.2 -+scipy>=1.10.0 -+scikit-learn>=1.2.1 - matplotlib>=2.0.0 - pytest - pyaml>=16.9 -diff --git a/setup.py b/setup.py -index 8879da880..e7f921765 100644 ---- a/setup.py -+++ b/setup.py -@@ -42,9 +42,9 @@ - classifiers=CLASSIFIERS, - packages=['skopt', 'skopt.learning', 'skopt.optimizer', 'skopt.space', - 'skopt.learning.gaussian_process', 'skopt.sampler'], -- install_requires=['joblib>=0.11', 'pyaml>=16.9', 'numpy>=1.13.3', -- 'scipy>=0.19.1', -- 'scikit-learn>=0.20.0'], -+ install_requires=['joblib>=0.11', 'pyaml>=16.9', 'numpy>=1.23.2', -+ 'scipy>=1.10.0', -+ 'scikit-learn>=1.2.1'], - extras_require={ - 'plots': ["matplotlib>=2.0.0"] - } -diff --git a/skopt/learning/forest.py b/skopt/learning/forest.py -index 096770c1d..ebde568f5 100644 ---- a/skopt/learning/forest.py -+++ b/skopt/learning/forest.py -@@ -27,7 +27,7 @@ def _return_std(X, trees, predictions, min_variance): - ------- - std : array-like, shape=(n_samples,) - Standard deviation of `y` at `X`. If criterion -- is set to "mse", then `std[i] ~= std(y | X[i])`. -+ is set to "squared_error", then `std[i] ~= std(y | X[i])`. - - """ - # This derives std(y | x) as described in 4.3.2 of arXiv:1211.0906 -@@ -61,9 +61,9 @@ class RandomForestRegressor(_sk_RandomForestRegressor): - n_estimators : integer, optional (default=10) - The number of trees in the forest. - -- criterion : string, optional (default="mse") -+ criterion : string, optional (default="squared_error") - The function to measure the quality of a split. Supported criteria -- are "mse" for the mean squared error, which is equal to variance -+ are "squared_error" for the mean squared error, which is equal to variance - reduction as feature selection criterion, and "mae" for the mean - absolute error. - -@@ -194,7 +194,7 @@ class RandomForestRegressor(_sk_RandomForestRegressor): - .. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32, 2001. - - """ -- def __init__(self, n_estimators=10, criterion='mse', max_depth=None, -+ def __init__(self, n_estimators=10, criterion='squared_error', max_depth=None, - min_samples_split=2, min_samples_leaf=1, - min_weight_fraction_leaf=0.0, max_features='auto', - max_leaf_nodes=None, min_impurity_decrease=0., -@@ -228,20 +228,20 @@ def predict(self, X, return_std=False): - Returns - ------- - predictions : array-like of shape = (n_samples,) -- Predicted values for X. If criterion is set to "mse", -+ Predicted values for X. If criterion is set to "squared_error", - then `predictions[i] ~= mean(y | X[i])`. - - std : array-like of shape=(n_samples,) - Standard deviation of `y` at `X`. If criterion -- is set to "mse", then `std[i] ~= std(y | X[i])`. -+ is set to "squared_error", then `std[i] ~= std(y | X[i])`. - - """ - mean = super(RandomForestRegressor, self).predict(X) - - if return_std: -- if self.criterion != "mse": -+ if self.criterion != "squared_error": - raise ValueError( -- "Expected impurity to be 'mse', got %s instead" -+ "Expected impurity to be 'squared_error', got %s instead" - % self.criterion) - std = _return_std(X, self.estimators_, mean, self.min_variance) - return mean, std -@@ -257,9 +257,9 @@ class ExtraTreesRegressor(_sk_ExtraTreesRegressor): - n_estimators : integer, optional (default=10) - The number of trees in the forest. - -- criterion : string, optional (default="mse") -+ criterion : string, optional (default="squared_error") - The function to measure the quality of a split. Supported criteria -- are "mse" for the mean squared error, which is equal to variance -+ are "squared_error" for the mean squared error, which is equal to variance - reduction as feature selection criterion, and "mae" for the mean - absolute error. - -@@ -390,7 +390,7 @@ class ExtraTreesRegressor(_sk_ExtraTreesRegressor): - .. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32, 2001. - - """ -- def __init__(self, n_estimators=10, criterion='mse', max_depth=None, -+ def __init__(self, n_estimators=10, criterion='squared_error', max_depth=None, - min_samples_split=2, min_samples_leaf=1, - min_weight_fraction_leaf=0.0, max_features='auto', - max_leaf_nodes=None, min_impurity_decrease=0., -@@ -425,19 +425,19 @@ def predict(self, X, return_std=False): - Returns - ------- - predictions : array-like of shape=(n_samples,) -- Predicted values for X. If criterion is set to "mse", -+ Predicted values for X. If criterion is set to "squared_error", - then `predictions[i] ~= mean(y | X[i])`. - - std : array-like of shape=(n_samples,) - Standard deviation of `y` at `X`. If criterion -- is set to "mse", then `std[i] ~= std(y | X[i])`. -+ is set to "squared_error", then `std[i] ~= std(y | X[i])`. - """ - mean = super(ExtraTreesRegressor, self).predict(X) - - if return_std: -- if self.criterion != "mse": -+ if self.criterion != "squared_error": - raise ValueError( -- "Expected impurity to be 'mse', got %s instead" -+ "Expected impurity to be 'squared_error', got %s instead" - % self.criterion) - std = _return_std(X, self.estimators_, mean, self.min_variance) - return mean, std - -From 6eb2d4ddaa299ae47d9a69ffb31ebc4ed366d1c1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20T=C3=B8rnes?= -Date: Thu, 16 Feb 2023 11:34:58 +0100 -Subject: [PATCH 2/5] Change test to be consistent with code changes. - ---- - skopt/learning/tests/test_forest.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/skopt/learning/tests/test_forest.py b/skopt/learning/tests/test_forest.py -index 0711cde9d..c6ed610f3 100644 ---- a/skopt/learning/tests/test_forest.py -+++ b/skopt/learning/tests/test_forest.py -@@ -35,7 +35,7 @@ def test_random_forest(): - assert_array_equal(clf.predict(T), true_result) - assert 10 == len(clf) - -- clf = RandomForestRegressor(n_estimators=10, criterion="mse", -+ clf = RandomForestRegressor(n_estimators=10, criterion="squared_error", - max_depth=None, min_samples_split=2, - min_samples_leaf=1, - min_weight_fraction_leaf=0., -@@ -80,7 +80,7 @@ def test_extra_forest(): - assert_array_equal(clf.predict(T), true_result) - assert 10 == len(clf) - -- clf = ExtraTreesRegressor(n_estimators=10, criterion="mse", -+ clf = ExtraTreesRegressor(n_estimators=10, criterion="squared_error", - max_depth=None, min_samples_split=2, - min_samples_leaf=1, min_weight_fraction_leaf=0., - max_features="auto", max_leaf_nodes=None, - -From 52c620add07d845debbaff2ce2b1c5faf3eae79b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20T=C3=B8rnes?= -Date: Wed, 22 Feb 2023 16:59:03 +0100 -Subject: [PATCH 3/5] Update skopt/learning/forest.py -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fix max line width - -Co-authored-by: Roland Laurès ---- - skopt/learning/forest.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/skopt/learning/forest.py b/skopt/learning/forest.py -index ebde568f5..07dc42664 100644 ---- a/skopt/learning/forest.py -+++ b/skopt/learning/forest.py -@@ -194,8 +194,8 @@ class RandomForestRegressor(_sk_RandomForestRegressor): - .. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32, 2001. - - """ -- def __init__(self, n_estimators=10, criterion='squared_error', max_depth=None, -- min_samples_split=2, min_samples_leaf=1, -+ def __init__(self, n_estimators=10, criterion='squared_error', -+ max_depth=None, min_samples_split=2, min_samples_leaf=1, - min_weight_fraction_leaf=0.0, max_features='auto', - max_leaf_nodes=None, min_impurity_decrease=0., - bootstrap=True, oob_score=False, - -From 52a7db95cb567186fb4e9003139fea4592bdbf05 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20T=C3=B8rnes?= -Date: Wed, 22 Feb 2023 17:03:25 +0100 -Subject: [PATCH 4/5] Fix line widht issues - ---- - skopt/learning/forest.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/skopt/learning/forest.py b/skopt/learning/forest.py -index 07dc42664..d4c24456b 100644 ---- a/skopt/learning/forest.py -+++ b/skopt/learning/forest.py -@@ -390,8 +390,8 @@ class ExtraTreesRegressor(_sk_ExtraTreesRegressor): - .. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32, 2001. - - """ -- def __init__(self, n_estimators=10, criterion='squared_error', max_depth=None, -- min_samples_split=2, min_samples_leaf=1, -+ def __init__(self, n_estimators=10, criterion='squared_error', -+ max_depth=None, min_samples_split=2, min_samples_leaf=1, - min_weight_fraction_leaf=0.0, max_features='auto', - max_leaf_nodes=None, min_impurity_decrease=0., - bootstrap=False, oob_score=False, - -From 6b185e489fb4a56625e8505292a20c80434f0633 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20T=C3=B8rnes?= -Date: Wed, 22 Feb 2023 18:37:11 +0100 -Subject: [PATCH 5/5] Fix lin width issues for comments. - ---- - skopt/learning/forest.py | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/skopt/learning/forest.py b/skopt/learning/forest.py -index d4c24456b..eb3bd6648 100644 ---- a/skopt/learning/forest.py -+++ b/skopt/learning/forest.py -@@ -63,9 +63,9 @@ class RandomForestRegressor(_sk_RandomForestRegressor): - - criterion : string, optional (default="squared_error") - The function to measure the quality of a split. Supported criteria -- are "squared_error" for the mean squared error, which is equal to variance -- reduction as feature selection criterion, and "mae" for the mean -- absolute error. -+ are "squared_error" for the mean squared error, which is equal to -+ variance reduction as feature selection criterion, and "mae" for the -+ mean absolute error. - - max_features : int, float, string or None, optional (default="auto") - The number of features to consider when looking for the best split: -@@ -259,9 +259,9 @@ class ExtraTreesRegressor(_sk_ExtraTreesRegressor): - - criterion : string, optional (default="squared_error") - The function to measure the quality of a split. Supported criteria -- are "squared_error" for the mean squared error, which is equal to variance -- reduction as feature selection criterion, and "mae" for the mean -- absolute error. -+ are "squared_error" for the mean squared error, which is equal to -+ variance reduction as feature selection criterion, and "mae" for the -+ mean absolute error. - - max_features : int, float, string or None, optional (default="auto") - The number of features to consider when looking for the best split: diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 93d3b25272..762e8c98e5 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -364,29 +364,16 @@ (define-public python-scikit-opt (define-public python-scikit-optimize (package (name "python-scikit-optimize") - (version "0.9.0") + (version "0.10.1") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/scikit-optimize/scikit-optimize") + (url "https://github.com/holgern/scikit-optimize") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "0hsq6pmryimxc275yrcy4bv217bx7ma6rz0q6m4138bv4zgq18d1")) - (patches - ;; These are for compatibility with more recent versions of - ;; numpy and scikit-learn. - (search-patches "python-scikit-optimize-1148.patch" - "python-scikit-optimize-1150.patch")) - (modules '((guix build utils))) - (snippet - ;; Since scikit-learn 1.3 max_features no longer supports - ;; 'auto', which is identical to 'sqrt' - '(substitute* '("skopt/learning/forest.py" - "skopt/learning/tests/test_forest.py") - (("max_features=['\"]auto['\"]") - "max_features='sqrt'"))))) + "1c9b7g3v9ajaq78nzv6gy3xqlfjlcqqhsq87d7gfc4pdswvfv1ns")))) (build-system pyproject-build-system) (propagated-inputs (list python-joblib