@@ -448,6 +448,11 @@ def path(self, X, y, alphas, coef_init=None, return_n_iter=True, **params):
448448 warm_start = self .warm_start , verbose = self .verbose )
449449 return solver .path (X , y , datafit , penalty , alphas , coef_init , return_n_iter )
450450
451+ def __sklearn_tags__ (self ):
452+ tags = super ().__sklearn_tags__ ()
453+ tags .input_tags .sparse = True
454+ return tags
455+
451456
452457class WeightedLasso (RegressorMixin , LinearModel ):
453458 r"""WeightedLasso estimator based on Celer solver and primal extrapolation.
@@ -611,6 +616,11 @@ def fit(self, X, y):
611616 warm_start = self .warm_start , verbose = self .verbose )
612617 return _glm_fit (X , y , self , Quadratic (), penalty , solver )
613618
619+ def __sklearn_tags__ (self ):
620+ tags = super ().__sklearn_tags__ ()
621+ tags .input_tags .sparse = True
622+ return tags
623+
614624
615625class ElasticNet (RegressorMixin , LinearModel ):
616626 r"""Elastic net estimator.
@@ -765,6 +775,11 @@ def fit(self, X, y):
765775 return _glm_fit (X , y , self , Quadratic (),
766776 L1_plus_L2 (self .alpha , self .l1_ratio , self .positive ), solver )
767777
778+ def __sklearn_tags__ (self ):
779+ tags = super ().__sklearn_tags__ ()
780+ tags .input_tags .sparse = True
781+ return tags
782+
768783
769784class MCPRegression (RegressorMixin , LinearModel ):
770785 r"""Linear regression with MCP penalty estimator.
@@ -953,6 +968,11 @@ def fit(self, X, y):
953968 warm_start = self .warm_start , verbose = self .verbose )
954969 return _glm_fit (X , y , self , Quadratic (), penalty , solver )
955970
971+ def __sklearn_tags__ (self ):
972+ tags = super ().__sklearn_tags__ ()
973+ tags .input_tags .sparse = True
974+ return tags
975+
956976
957977class SparseLogisticRegression (LinearClassifierMixin , SparseCoefMixin , BaseEstimator ):
958978 r"""Sparse Logistic regression estimator.
@@ -1380,6 +1400,11 @@ def fit(self, X, y):
13801400
13811401 return self
13821402
1403+ def __sklearn_tags__ (self ):
1404+ tags = super ().__sklearn_tags__ ()
1405+ tags .input_tags .sparse = True
1406+ return tags
1407+
13831408
13841409class MultiTaskLasso (RegressorMixin , LinearModel ):
13851410 r"""MultiTaskLasso estimator.
0 commit comments