Warning: This documentation is for scikits.learn version 0.6.0. — Latest stable version

Contents

6.2.13. scikits.learn.linear_model.lars_path

scikits.learn.linear_model.lars_path(X, y, Xy=None, Gram=None, max_features=None, alpha_min=0, method='lar', overwrite_X=False, overwrite_Gram=False, verbose=False)

Compute Least Angle Regression and LASSO path

Parameters :

X: array, shape: (n_samples, n_features) :

Input data

y: array, shape: (n_samples) :

Input targets

max_features: integer, optional :

Maximum number of selected features.

Gram: array, shape: (n_features, n_features), optional :

Precomputed Gram matrix (X’ * X)

alpha_min: float, optional :

Minimum correlation along the path. It corresponds to the regularization parameter alpha parameter in the Lasso.

method: ‘lar’ or ‘lasso’ :

Specifies the problem solved: the LAR or its variant the LASSO-LARS that gives the solution of the LASSO problem for any regularization parameter.

Returns :

alphas: array, shape: (k) :

The alphas along the path

active: array, shape (?) :

Indices of active variables at the end of the path.

coefs: array, shape (p, k) :

Coefficients along the path

Notes