Skip to content

Commit

Permalink
LogisticRegressionLearner: Remove deprecated argument 'multi_class'
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Dec 14, 2024
1 parent c2c1648 commit b0ed95d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Orange/classification/logistic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LogisticRegressionLearner(SklLearner, _FeatureScorerMixin):
def __init__(self, penalty="l2", dual=False, tol=0.0001, C=1.0,
fit_intercept=True, intercept_scaling=1, class_weight=None,
random_state=None, solver="auto", max_iter=100,
multi_class="auto", verbose=0, n_jobs=1, preprocessors=None):
verbose=0, n_jobs=1, preprocessors=None):
super().__init__(preprocessors=preprocessors)
self.params = vars()

Expand All @@ -49,7 +49,7 @@ def _initialize_wrapped(self):
solver, penalty = params.pop("solver"), params.get("penalty")
if solver == "auto":
if penalty == "l1":
solver = "liblinear"
solver = "saga"
else:
solver = "lbfgs"
params["solver"] = solver
Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/visualize/tests/test_ownomogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def test_nomogram_lr_multiclass(self):
"""Check probabilities for logistic regression classifier for various
values of classes and radio buttons for multiclass data"""
cls = LogisticRegressionLearner(
multi_class="ovr", solver="liblinear"
solver="liblinear"
)(self.lenses)
self._test_helper(cls, [9, 45, 52])

Expand Down

0 comments on commit b0ed95d

Please sign in to comment.