Xval

This revives #235. Now that all the other elements are in place, I think that this is ready for review and in principle ready to be merged upstream (once it's been reviewed and fixed up, of course!). I am excited about this PR - evaluation of DWI models is something that I have been thinking a lot about in the past couple of years, since I started working on DWI. 

This PR also demonstrates the power and elegance of the uniform `Model`/`Fit` API we have in place. GGT!

For now, this PR only implements cross-validation for CSD and for the tensor model, but future work could extend this to other models, by implementing their `predict` methods. 

Also : a lot of PEP8 fixes in the CSD module and elsewhere :-) 
Great to hear about Chantal Tax working to make this available in dipy.
That would be a great addition to have. I am also doing some work in that
direction, but it's really early days, so it's still not ready for prime
time.


On Wed, Jul 2, 2014 at 12:25 PM, Eleftherios Garyfallidis <
notifications@github.com> wrote:

> In doc/examples/kfold_xval.py:
>
> > +
> > +dpd.fetch_stanford_hardi()
> > +img, gtab = dpd.read_stanford_hardi()
> > +data = img.get_data()
> > +
> > +cc_vox = data[40, 70, 38]
> > +cso_vox = data[30, 76, 38]
> > +
> > +"""
> > +
> > +We initialize each kind of model:
> > +
> > +"""
> > +
> > +dti_model = dti.TensorModel(gtab)
> > +response, ratio = csd.auto_response(gtab, data, roi_radius=10, fa_thr=0.7)
>
> I have to say here that Chantal Tax has a paper on how to get a response
> function in a better way. And she is currently working on making this
> available in Dipy.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nipy/dipy/pull/335/files#r14478056>.
>