Contents

scikits.learn.glm.lars_path

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

Compute Least Angle Regression and LASSO path

Parameters :

X: array, shape: (n, p) :

Input data

y: array, shape: (n) :

Input targets

max_features: integer, optional :

The number of selected features

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

Precomputed Gram matrix (X’ * X)

alpha_min: float, optional :

The 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