|
10 | 10 | from sklearn.utils.validation import (check_is_fitted, check_array,
|
11 | 11 | check_consistent_length)
|
12 | 12 | from sklearn.linear_model._base import (
|
13 |
| - LinearModel, RegressorMixin, |
| 13 | + RegressorMixin, LinearModel, |
14 | 14 | LinearClassifierMixin, SparseCoefMixin, BaseEstimator
|
15 | 15 | )
|
16 | 16 | from sklearn.utils.extmath import softmax
|
@@ -302,7 +302,7 @@ def get_params(self, deep=False):
|
302 | 302 | return params
|
303 | 303 |
|
304 | 304 |
|
305 |
| -class Lasso(LinearModel, RegressorMixin): |
| 305 | +class Lasso(RegressorMixin, LinearModel): |
306 | 306 | r"""Lasso estimator based on Celer solver and primal extrapolation.
|
307 | 307 |
|
308 | 308 | The optimization objective for Lasso is:
|
@@ -449,7 +449,7 @@ def path(self, X, y, alphas, coef_init=None, return_n_iter=True, **params):
|
449 | 449 | return solver.path(X, y, datafit, penalty, alphas, coef_init, return_n_iter)
|
450 | 450 |
|
451 | 451 |
|
452 |
| -class WeightedLasso(LinearModel, RegressorMixin): |
| 452 | +class WeightedLasso(RegressorMixin, LinearModel): |
453 | 453 | r"""WeightedLasso estimator based on Celer solver and primal extrapolation.
|
454 | 454 |
|
455 | 455 | The optimization objective for WeightedLasso is:
|
@@ -612,7 +612,7 @@ def fit(self, X, y):
|
612 | 612 | return _glm_fit(X, y, self, Quadratic(), penalty, solver)
|
613 | 613 |
|
614 | 614 |
|
615 |
| -class ElasticNet(LinearModel, RegressorMixin): |
| 615 | +class ElasticNet(RegressorMixin, LinearModel): |
616 | 616 | r"""Elastic net estimator.
|
617 | 617 |
|
618 | 618 | The optimization objective for Elastic net is:
|
@@ -766,7 +766,7 @@ def fit(self, X, y):
|
766 | 766 | L1_plus_L2(self.alpha, self.l1_ratio, self.positive), solver)
|
767 | 767 |
|
768 | 768 |
|
769 |
| -class MCPRegression(LinearModel, RegressorMixin): |
| 769 | +class MCPRegression(RegressorMixin, LinearModel): |
770 | 770 | r"""Linear regression with MCP penalty estimator.
|
771 | 771 |
|
772 | 772 | The optimization objective for MCPRegression is, with :math:`x >= 0`:
|
@@ -1381,7 +1381,7 @@ def fit(self, X, y):
|
1381 | 1381 | return self
|
1382 | 1382 |
|
1383 | 1383 |
|
1384 |
| -class MultiTaskLasso(LinearModel, RegressorMixin): |
| 1384 | +class MultiTaskLasso(RegressorMixin, LinearModel): |
1385 | 1385 | r"""MultiTaskLasso estimator.
|
1386 | 1386 |
|
1387 | 1387 | The optimization objective for MultiTaskLasso is:
|
@@ -1557,7 +1557,7 @@ def path(self, X, Y, alphas, coef_init=None, return_n_iter=False, **params):
|
1557 | 1557 | return solver.path(X, Y, datafit, penalty, alphas, coef_init, return_n_iter)
|
1558 | 1558 |
|
1559 | 1559 |
|
1560 |
| -class GroupLasso(LinearModel, RegressorMixin): |
| 1560 | +class GroupLasso(RegressorMixin, LinearModel): |
1561 | 1561 | r"""GroupLasso estimator based on Celer solver and primal extrapolation.
|
1562 | 1562 |
|
1563 | 1563 | The optimization objective for GroupLasso is:
|
|
0 commit comments