From c41274b046ca6217ceeb49bf0fe0caeb5440b594 Mon Sep 17 00:00:00 2001 From: Ruben Date: Wed, 9 Dec 2020 19:20:06 +0100 Subject: [PATCH 1/2] increased required sklearn version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ec561515..22b52544 100755 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ def get_long_description(): 'numpy >= 1.9.0', 'scipy', 'six', - 'scikit-learn >= 0.18', + 'scikit-learn >= 0.20', 'graphviz', 'tabulate>=0.7.7', ], From 9dfda19446cfa394fc65de1ff120952b81c90971 Mon Sep 17 00:00:00 2001 From: Ruben Menke Date: Tue, 12 Jan 2021 15:43:32 +0100 Subject: [PATCH 2/2] upgrade requirements to sklearn 0.24 --- docs/requirements.txt | 2 +- eli5/base_utils.py | 2 +- eli5/sklearn/permutation_importance.py | 2 +- eli5/sklearn/transform.py | 2 +- requirements.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 9b81c79a..ea3b328e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,5 +4,5 @@ sphinx_rtd_theme ipython scipy numpy > 1.9.0 -scikit-learn >= 0.18 +scikit-learn >= 0.20 typing diff --git a/eli5/base_utils.py b/eli5/base_utils.py index f1081c3b..ba073ad4 100644 --- a/eli5/base_utils.py +++ b/eli5/base_utils.py @@ -25,7 +25,7 @@ def attrs(class_): if method in class_.__dict__: # Allow to redefine a special method (or else attr.s will do it) attrs_kwargs[kw_name] = False - init_args = inspect.getargspec(class_.__init__) + init_args = inspect.getfullargspec(class_.__init__) defaults_shift = len(init_args.args) - len(init_args.defaults or []) - 1 these = {} for idx, arg in enumerate(init_args.args[1:]): diff --git a/eli5/sklearn/permutation_importance.py b/eli5/sklearn/permutation_importance.py index 370be8be..bbf36050 100644 --- a/eli5/sklearn/permutation_importance.py +++ b/eli5/sklearn/permutation_importance.py @@ -12,7 +12,7 @@ clone, is_classifier ) -from sklearn.metrics.scorer import check_scoring +from sklearn.metrics import check_scoring from eli5.permutation_importance import get_score_importances from eli5.sklearn.utils import pandas_available diff --git a/eli5/sklearn/transform.py b/eli5/sklearn/transform.py index 8d79f555..23b2764f 100644 --- a/eli5/sklearn/transform.py +++ b/eli5/sklearn/transform.py @@ -3,7 +3,7 @@ import numpy as np from sklearn.pipeline import Pipeline, FeatureUnion -from sklearn.feature_selection.base import SelectorMixin +from sklearn.feature_selection import SelectorMixin from sklearn.preprocessing import ( MinMaxScaler, diff --git a/requirements.txt b/requirements.txt index ca97e5d2..97eb8df3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ numpy >= 1.9.0 scipy singledispatch >= 3.4.0.3 -scikit-learn >= 0.18 +scikit-learn >= 0.20 attrs > 16.0.0 jinja2 pip >= 8.1