Skip to content

Commit ca188f4

Browse files
committed
fix some sklearn errors
1 parent 97faf9e commit ca188f4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

skglm/estimators.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from sklearn.utils.validation import (check_is_fitted, check_array,
1111
check_consistent_length)
1212
from sklearn.linear_model._base import (
13-
LinearModel, RegressorMixin,
13+
RegressorMixin, LinearModel,
1414
LinearClassifierMixin, SparseCoefMixin, BaseEstimator
1515
)
1616
from sklearn.utils.extmath import softmax
@@ -302,7 +302,7 @@ def get_params(self, deep=False):
302302
return params
303303

304304

305-
class Lasso(LinearModel, RegressorMixin):
305+
class Lasso(RegressorMixin, LinearModel):
306306
r"""Lasso estimator based on Celer solver and primal extrapolation.
307307
308308
The optimization objective for Lasso is:
@@ -449,7 +449,7 @@ def path(self, X, y, alphas, coef_init=None, return_n_iter=True, **params):
449449
return solver.path(X, y, datafit, penalty, alphas, coef_init, return_n_iter)
450450

451451

452-
class WeightedLasso(LinearModel, RegressorMixin):
452+
class WeightedLasso(RegressorMixin, LinearModel):
453453
r"""WeightedLasso estimator based on Celer solver and primal extrapolation.
454454
455455
The optimization objective for WeightedLasso is:
@@ -612,7 +612,7 @@ def fit(self, X, y):
612612
return _glm_fit(X, y, self, Quadratic(), penalty, solver)
613613

614614

615-
class ElasticNet(LinearModel, RegressorMixin):
615+
class ElasticNet(RegressorMixin, LinearModel):
616616
r"""Elastic net estimator.
617617
618618
The optimization objective for Elastic net is:
@@ -766,7 +766,7 @@ def fit(self, X, y):
766766
L1_plus_L2(self.alpha, self.l1_ratio, self.positive), solver)
767767

768768

769-
class MCPRegression(LinearModel, RegressorMixin):
769+
class MCPRegression(RegressorMixin, LinearModel):
770770
r"""Linear regression with MCP penalty estimator.
771771
772772
The optimization objective for MCPRegression is, with :math:`x >= 0`:
@@ -1373,7 +1373,7 @@ def fit(self, X, y):
13731373
return self
13741374

13751375

1376-
class MultiTaskLasso(LinearModel, RegressorMixin):
1376+
class MultiTaskLasso(RegressorMixin, LinearModel):
13771377
r"""MultiTaskLasso estimator.
13781378
13791379
The optimization objective for MultiTaskLasso is:
@@ -1549,7 +1549,7 @@ def path(self, X, Y, alphas, coef_init=None, return_n_iter=False, **params):
15491549
return solver.path(X, Y, datafit, penalty, alphas, coef_init, return_n_iter)
15501550

15511551

1552-
class GroupLasso(LinearModel, RegressorMixin):
1552+
class GroupLasso(RegressorMixin, LinearModel):
15531553
r"""GroupLasso estimator based on Celer solver and primal extrapolation.
15541554
15551555
The optimization objective for GroupLasso is:

0 commit comments

Comments
 (0)