(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
Good point. This is garbage (the initialization).

On Fri, Oct 17, 2014 at 3:19 PM, eickenberg <notifications@github.com>
wrote:

> In nilearn/decoding/fista.py:
>
> > +        objective.append(old_energy)
> > +        w_old = w.copy()
> > +
> > +        # Invoke callback.
> > +        if verbose:
> > +            print 'mFISTA: Iteration % 2i/%2i: E = %7.4e, dE % 4.4e' % (
> > +                i + 1, max_iter, old_energy, energy_delta)
> > +        if callback and callback(locals()):
> > +            break
> > +        if np.abs(energy_delta) < tol:
> > +            if verbose:
> > +                print "\tConverged (|dE| < %g)" % tol
> > +            break
> > +
> > +        # Forward (gradient) step
> > +        gradient_buffer = f1_grad(z)
>
> Why is gradient_buffer initialized above, if its pointer is overwritten
> here? Either update inplace gradient_buffer[:] = f1_grad(z) or don't
> initialize. (modulo my missing something between the initialization line
> and here)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nilearn/nilearn/pull/219/files#r19016663>.
>



-- 
DED