Sparse Fascicle Model

This is a start on an implementation of the model we describe here: 

http://arxiv.org/abs/1411.0721

The main current issue with this is that this will have a local dependency on scikit-learn, because it uses ElasticNet for the fit. How do people feel about that? 
Almost certainly

On Sat, Dec 13, 2014 at 7:38 PM, Eleftherios Garyfallidis <
notifications@github.com> wrote:
>
> In dipy/reconst/sfm.py
> <https://github.com/nipy/dipy/pull/460#discussion-diff-21793414>:
>
> > +
> > +        """
> > +        if mask is None:
> > +            flat_data = np.reshape(data, (-1, data.shape[-1]))
> > +        else:
> > +            mask = np.array(mask, dtype=bool, copy=False)
> > +            flat_data = np.reshape(data[mask], (-1, data.shape[-1]))
> > +
> > +        # Fitting is done on the relative signal (S/S0):
> > +        flat_S0 = np.mean(flat_data[..., self.gtab.b0s_mask], -1)
> > +        flat_S = flat_data[..., ~self.gtab.b0s_mask] / flat_S0[..., None]
> > +        flat_mean = np.mean(flat_S, -1)
> > +        flat_params = np.zeros((flat_data.shape[0],
> > +                                self.design_matrix.shape[-1]))
> > +
> > +        for vox, dd in enumerate(flat_S):
>
> dd? Can we use a more descriptive name?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nipy/dipy/pull/460/files#r21793414>.
>