|
1 | | -import warnings |
2 | | - |
3 | 1 | import numpy as np |
4 | 2 | import sklearn.linear_model as skl_linear_model |
5 | 3 |
|
6 | 4 | from Orange.classification import SklLearner, SklModel |
7 | 5 | from Orange.preprocess import Normalize |
8 | 6 | from Orange.preprocess.score import LearnerScorer |
9 | 7 | from Orange.data import Variable, DiscreteVariable |
10 | | -from Orange.util import OrangeDeprecationWarning |
11 | 8 |
|
12 | 9 |
|
13 | 10 | __all__ = ["LogisticRegressionLearner"] |
@@ -42,23 +39,13 @@ class LogisticRegressionLearner(SklLearner, _FeatureScorerMixin): |
42 | 39 | def __init__(self, penalty="l2", dual=False, tol=0.0001, C=1.0, |
43 | 40 | fit_intercept=True, intercept_scaling=1, class_weight=None, |
44 | 41 | random_state=None, solver="auto", max_iter=100, |
45 | | - multi_class="deprecated", verbose=0, n_jobs=1, preprocessors=None): |
46 | | - if multi_class != "deprecated": |
47 | | - warnings.warn("The multi_class parameter was " |
48 | | - "deprecated in scikit-learn 1.5. Using it with " |
49 | | - "scikit-learn 1.7 will lead to a crash.", |
50 | | - OrangeDeprecationWarning, |
51 | | - stacklevel=2) |
| 42 | + verbose=0, n_jobs=1, preprocessors=None): |
52 | 43 | super().__init__(preprocessors=preprocessors) |
53 | 44 | self.params = vars() |
54 | 45 |
|
55 | 46 | def _initialize_wrapped(self): |
56 | 47 | params = self.params.copy() |
57 | 48 |
|
58 | | - multi_class = params.pop("multi_class") |
59 | | - if multi_class != "deprecated": |
60 | | - params["multi_class"] = multi_class |
61 | | - |
62 | 49 | # The default scikit-learn solver `lbfgs` (v0.22) does not support the |
63 | 50 | # l1 penalty. |
64 | 51 | solver, penalty = params.pop("solver"), params.get("penalty") |
|
0 commit comments