@@ -187,9 +187,13 @@ def _randomized_lasso(X, y, weights, mask, alpha=1., verbose=False,
187
187
class RandomizedLasso (BaseRandomizedLinearModel ):
188
188
"""Randomized Lasso.
189
189
190
- Randomized Lasso works by resampling the train data and computing
191
- a Lasso on each resampling. In short, the features selected more
192
- often are good features. It is also known as stability selection.
190
+ Randomized Lasso works by subsampling the training data and
191
+ computing a Lasso estimate where the penalty of a random subset of
192
+ coefficients has been scaled. By performing this double
193
+ randomization several times, the method assigns high scores to
194
+ features that are repeatedly selected across randomizations. This
195
+ is known as stability selection. In short, features selected more
196
+ often are considered good features.
193
197
194
198
Read more in the :ref:`User Guide <randomized_l1>`.
195
199
@@ -201,8 +205,9 @@ class RandomizedLasso(BaseRandomizedLinearModel):
201
205
article which is scaling.
202
206
203
207
scaling : float, optional
204
- The alpha parameter in the stability selection article used to
205
- randomly scale the features. Should be between 0 and 1.
208
+ The s parameter used to randomly scale the penalty of different
209
+ features (See :ref:`User Guide <randomized_l1>` for details ).
210
+ Should be between 0 and 1.
206
211
207
212
sample_fraction : float, optional
208
213
The fraction of samples to be used in each randomized design.
@@ -226,11 +231,11 @@ class RandomizedLasso(BaseRandomizedLinearModel):
226
231
If True, the regressors X will be normalized before regression.
227
232
This parameter is ignored when `fit_intercept` is set to False.
228
233
When the regressors are normalized, note that this makes the
229
- hyperparameters learnt more robust and almost independent of the number
230
- of samples. The same property is not valid for standardized data.
231
- However, if you wish to standardize, please use
232
- `preprocessing.StandardScaler` before calling `fit` on an estimator
233
- with `normalize=False`.
234
+ hyperparameters learned more robust and almost independent of
235
+ the number of samples. The same property is not valid for
236
+ standardized data. However, if you wish to standardize, please
237
+ use `preprocessing.StandardScaler` before calling `fit` on an
238
+ estimator with `normalize=False`.
234
239
235
240
precompute : True | False | 'auto'
236
241
Whether to use a precomputed Gram matrix to speed up
@@ -307,7 +312,7 @@ class RandomizedLasso(BaseRandomizedLinearModel):
307
312
308
313
See also
309
314
--------
310
- RandomizedLogisticRegression, LogisticRegression
315
+ RandomizedLogisticRegression, Lasso, ElasticNet
311
316
"""
312
317
def __init__ (self , alpha = 'aic' , scaling = .5 , sample_fraction = .75 ,
313
318
n_resampling = 200 , selection_threshold = .25 ,
@@ -378,9 +383,13 @@ def _randomized_logistic(X, y, weights, mask, C=1., verbose=False,
378
383
class RandomizedLogisticRegression (BaseRandomizedLinearModel ):
379
384
"""Randomized Logistic Regression
380
385
381
- Randomized Regression works by resampling the train data and computing
382
- a LogisticRegression on each resampling. In short, the features selected
383
- more often are good features. It is also known as stability selection.
386
+ Randomized Logistic Regression works by subsampling the training
387
+ data and fitting a L1-penalized LogisticRegression model where the
388
+ penalty of a random subset of coefficients has been scaled. By
389
+ performing this double randomization several times, the method
390
+ assigns high scores to features that are repeatedly selected across
391
+ randomizations. This is known as stability selection. In short,
392
+ features selected more often are considered good features.
384
393
385
394
Read more in the :ref:`User Guide <randomized_l1>`.
386
395
@@ -390,8 +399,9 @@ class RandomizedLogisticRegression(BaseRandomizedLinearModel):
390
399
The regularization parameter C in the LogisticRegression.
391
400
392
401
scaling : float, optional, default=0.5
393
- The alpha parameter in the stability selection article used to
394
- randomly scale the features. Should be between 0 and 1.
402
+ The s parameter used to randomly scale the penalty of different
403
+ features (See :ref:`User Guide <randomized_l1>` for details ).
404
+ Should be between 0 and 1.
395
405
396
406
sample_fraction : float, optional, default=0.75
397
407
The fraction of samples to be used in each randomized design.
@@ -484,7 +494,7 @@ class RandomizedLogisticRegression(BaseRandomizedLinearModel):
484
494
485
495
See also
486
496
--------
487
- RandomizedLasso, Lasso, ElasticNet
497
+ RandomizedLasso, LogisticRegression
488
498
"""
489
499
def __init__ (self , C = 1 , scaling = .5 , sample_fraction = .75 ,
490
500
n_resampling = 200 ,
0 commit comments