celer.celer_path

celer.celer_path(X, y, eps=0.001, n_alphas=100, alphas=None, max_iter=20, gap_freq=10, max_epochs=50000, p0=10, verbose=0, verbose_inner=0, tol=1e-06, prune=0, return_thetas=False)

Compute Lasso path with Celer as inner solver.

Parameters:

X : {array-like, sparse matrix}, shape (n_samples, n_features)

Training data. Pass directly as Fortran-contiguous data or column sparse format (CSC) to avoid unnecessary memory duplication.

y : ndarray, shape (n_samples,)

Target values

eps : float, optional

Length of the path. eps=1e-3 means that alpha_min = 1e-3 * alpha_max

n_alphas : int, optional

Number of alphas along the regularization path

alphas : ndarray, optional

List of alphas where to compute the models. If None alphas are set automatically

max_iter : int, optional

The maximum number of iterations (subproblem definitions)

gap_freq : int, optional

Number of coordinate descent epochs between each duality gap computations.

max_epochs : int, optional

Maximum number of CD epochs on each subproblem.

p0 : int, optional

First working set size.

verbose : bool or integer, optional

Amount of verbosity.

verbose_inner : bool or integer

Amount of verbosity in the inner solver.

tol : float, optional

The tolerance for the optimization: the solver runs until the duality gap is smaller than tol or the maximum number of iteration is reached.

prune : 0 | 1, optional

Whether or not to use pruning when growing working sets.

return_thetas : bool, optional

If True, dual variables along the path are returned.

Returns:

alphas : array, shape (n,_alphas,)

The alphas along the path where models are computed.

coefs : array, shape (n_features, n_alphas)

Coefficients along the path.

dual_gaps : array, shape (n_alphas,)

Duality gaps returned by the solver along the path.

thetas : array, shape (n_alphas, n_samples)

The dual variables along the path. (Is returned only when return_thetas is set to True).

Fork me on GitHub