(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
No, w.copy() is just fine.

On Fri, Oct 17, 2014 at 3:15 PM, eickenberg <notifications@github.com>
wrote:

> In nilearn/decoding/fista.py:
>
> > +    energy_delta = np.inf
> > +    best_w = w.copy()
> > +    best_energy = old_energy
> > +    best_dgap_tol = dgap_tol
> > +    ista_step = False
> > +    best_z = z.copy()
> > +    best_t = t
> > +    best_dgap_tol = dgap_tol
> > +    prox_info = dict(converged=True)
> > +    stepsize = 1. / lipschitz_constant
> > +    objective = []
> > +
> > +    # FISTA loop
> > +    for i in xrange(int(max_iter)):
> > +        objective.append(old_energy)
> > +        w_old = w.copy()
>
> Shouldn't we prefer pre-allocating space for w_old, then setting it
> inplace using w_old[:] = w in order to avoid re-allocating heap memory in
> different places? Or is my thinking deprecated and old-school? :)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nilearn/nilearn/pull/219/files#r19016430>.
>



-- 
DED