(WIP) Sparse models: S-LASSO and TV-l1

- Supports TV-l1 and S-LASSO priors
- Supports logistic and squared losses
- Has cross validation
- Can automatically select alpha by CV (+ automatic computation of useful alpha ranges for the CV)
- Warning: User must supply l1_ratio
OK, makes sense. Done.


On Sun, Jun 29, 2014 at 11:57 AM, Alexandre Gramfort <
notifications@github.com> wrote:

> In nilearn/sparse_models/tv.py:
>
> > +import numpy as np
> > +from .common import (compute_mse_lipschitz_constant,
> > +                     compute_logistic_lipschitz_
> constant,
> > +                     tv_l1_reg_objective, mse_loss, mse_loss_grad,
> > +                     logistic_grad as logistic_loss_grad,
> > +                     logistic as logistic_loss)
> > +from .prox_tv_l1 import prox_tv_l1, intercepted_prox_tv_l1
> > +from .fista import mfista
> > +
> > +
> > +def tvl1_solver(X, y, alpha, l1_ratio, mask=None, loss=None,
> > +                rescale_alpha=True, lipschitz_constant=None,
> > +                prox_max_iter=5000, verbose=0, tol=1e-4, **kwargs):
> > +    """Minimizes empirical risk for TV-l1 penalized least-squares (
> > +    mean square error --a.k.a mse) or logisitc regression. The same solver
> > +    works for both of this losses.
>
> docstring structures
>
> """Headline
>
> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
> veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
> commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
> velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
> occaecat cupidatat non proident, sunt in culpa qui officia deserunt
> mollit anim id est laborum.
>
> Parameters
> ---------------
> foo : type
>     Description.
>
> Returns
> ----------
> out : type
>     Description.
>
> Headline fits on one line.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nilearn/nilearn/pull/219/files#r14328391>.
>



-- 
DED