Randomized LASSO

The documentation of the randomized_lasso module.

This module contains implementations of randomized logistic regression and randomized LASSO regression [R713f7f05a41c-1] .

References

[R713f7f05a41c-1]Meinshausen, N. and Buhlmann, P., 2010. Stability selection. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72(4), pp.417-473.
class stability_selection.randomized_lasso.RandomizedLogisticRegression(weakness=0.5, tol=0.0001, C=1.0, fit_intercept=True, intercept_scaling=1, class_weight=None, random_state=None, solver='liblinear', max_iter=100, multi_class='ovr', verbose=0, warm_start=False, n_jobs=1)[source]

Randomized version of scikit-learns LogisticRegression class.

Randomized LASSO is a generalization of the LASSO. The LASSO penalises the absolute value of the coefficients with a penalty term proportional to C, but the randomized LASSO changes the penalty to a randomly chosen value in the range [C, C/weakness].

Parameters:
weakness : float

Weakness value for randomized LASSO. Must be in (0, 1].

See also

sklearn.linear_model.LogisticRegression
learns logistic regression

models

fit(X, y, sample_weight=None)[source]

Fit the model according to the given training data.

Parameters:
X : {array-like, sparse matrix}, shape = [n_samples, n_features]

The training input samples.

y : array-like, shape = [n_samples]

The target values.

sample_weight : array-like, shape (n_samples,) optional

Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight.

class stability_selection.randomized_lasso.RandomizedLasso(weakness=0.5, alpha=1.0, fit_intercept=True, normalize=False, precompute=False, copy_X=True, max_iter=1000, tol=0.0001, warm_start=False, positive=False, random_state=None, selection='cyclic')[source]

Randomized version of scikit-learns Lasso class.

Randomized LASSO is a generalization of the LASSO. The LASSO penalises the absolute value of the coefficients with a penalty term proportional to alpha, but the randomized LASSO changes the penalty to a randomly chosen value in the range [alpha, alpha/weakness].

Parameters:
weakness : float

Weakness value for randomized LASSO. Must be in (0, 1].

See also

sklearn.linear_model.LogisticRegression
learns logistic regression models

using

fit(X, y)[source]

Fit the model according to the given training data.

Parameters:
X : {array-like, sparse matrix}, shape = [n_samples, n_features]

The training input samples.

y : array-like, shape = [n_samples]

The target values.