(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
This trick imay be good for spatial prior, but then we need to unmask the
design matrix X unto the larger / dilated support (for we always require
mask.sum() == X.shape[1]).

On Tue, Oct 14, 2014 at 4:49 PM, Gael Varoquaux <notifications@github.com>
wrote:

> In nilearn/decoding/space_net.py:
>
> > +    n_samples, _ = X.shape
> > +
> > +    # make local copy of mask
> > +    mask = mask.copy()
> > +
> > +    # misc
> > +    verbose = solver_params.get('verbose', 0)
> > +    alphas = sorted(alphas)[::-1]
> > +
> > +    # univariate feature screening
> > +    if screening_percentile < 100.:
> > +        # smooth the data before screening
> > +        sX = np.empty(list(mask.shape) + [n_samples])
> > +        for row in xrange(n_samples):
> > +            sX[:, :, :, row] = _unmask(X[row], mask)
> > +        sX = _fast_smooth_array(sX)
>
> After investigation, the mask returned by the strategy we have here is not
> sufficiently structured. Thus I suggest, first to change the default
> percentile to 20% of the brain, and second the following strategy, which
> works better:
>
> sX = ndimage.gaussian_filter(sX, (2, 2, 2, 0))
> ...
> mask[mask] = (support > 0)
> mask = ndimage.binary_dilation(mask).astype(np.bool)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nilearn/nilearn/pull/219/files#r18833219>.
>



-- 
DED