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? 
Cool. Good to know.

On Sat, Dec 13, 2014 at 1:49 PM, Eleftherios Garyfallidis <
notifications@github.com> wrote:
>
> In dipy/reconst/sfm.py
> <https://github.com/nipy/dipy/pull/460#discussion-diff-21791592>:
>
> > +        Returns
> > +        -------
> > +        odf :  ndarray of shape (x, y, z, sphere.vertices.shape[0])
> > +
> > +        """
> > +        odf_matrix = self.model.cache_get('odf_matrix', key=sphere)
> > +        if odf_matrix is None:
> > +            odf_matrix = sfm_design_matrix(sphere, self.model.sphere,
> > +                                           self.model.response, mode='odf')
> > +            self.model.cache_set('odf_matrix', key=sphere, value=odf_matrix)
> > +
> > +        flat_beta = self.beta.reshape(-1, self.beta.shape[-1])
> > +        flat_odf = np.dot(odf_matrix, flat_beta.T)
> > +        return flat_odf.T.reshape(self.beta.shape[:-1] +
> > +                                  (odf_matrix.shape[0], ))
> > +
>
> It's one line for class methods.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nipy/dipy/pull/460/files#r21791592>.
>