@@ -170,6 +170,23 @@ def _alpha_grid(
170
170
return np .geomspace (alpha_max , alpha_max * eps , num = n_alphas )
171
171
172
172
173
+ @validate_params (
174
+ {
175
+ "X" : ["array-like" , "sparse matrix" ],
176
+ "y" : ["array-like" , "sparse matrix" ],
177
+ "eps" : [Interval (Real , 0 , None , closed = "neither" )],
178
+ "n_alphas" : [Interval (Integral , 1 , None , closed = "left" )],
179
+ "alphas" : ["array-like" , None ],
180
+ "precompute" : [StrOptions ({"auto" }), "boolean" , "array-like" ],
181
+ "Xy" : ["array-like" , None ],
182
+ "copy_X" : ["boolean" ],
183
+ "coef_init" : ["array-like" , None ],
184
+ "verbose" : ["verbose" ],
185
+ "return_n_iter" : ["boolean" ],
186
+ "positive" : ["boolean" ],
187
+ },
188
+ prefer_skip_nested_validation = True ,
189
+ )
173
190
def lasso_path (
174
191
X ,
175
192
y ,
@@ -224,7 +241,7 @@ def lasso_path(
224
241
n_alphas : int, default=100
225
242
Number of alphas along the regularization path.
226
243
227
- alphas : ndarray , default=None
244
+ alphas : array-like , default=None
228
245
List of alphas where to compute the models.
229
246
If ``None`` alphas are set automatically.
230
247
@@ -242,7 +259,7 @@ def lasso_path(
242
259
copy_X : bool, default=True
243
260
If ``True``, X will be copied; else, it may be overwritten.
244
261
245
- coef_init : ndarray of shape (n_features, ), default=None
262
+ coef_init : array-like of shape (n_features, ), default=None
246
263
The initial values of the coefficients.
247
264
248
265
verbose : bool or int, default=False
0 commit comments