I am hoping that in some far-flung future it will be more general. For
example, for the cross-validation of tracks, but I will move this into core
for now.


On Fri, Sep 6, 2013 at 11:36 AM, Eleftherios Garyfallidis <
notifications@github.com> wrote:

> In dipy/stats/xvalidation.py:
>
> > +    -----
> > +    This function assumes that a prediction API is implemented in the Model
> > +    class for which prediction is conducted. That is, the Fit object that gets
> > +    generated upon fitting the model needs to have a `predict` method, which
> > +    receives a GradientTable class instance as input and produces a predicted
> > +    signal as output.
> > +
> > +    It also assumes that the model object has `bval` and `bvec` attributes
> > +    holding b-values and corresponding unit vectors.
> > +
> > +    """
> > +    if hasattr(model, 'bval'): # e.g. DTI
> > +        gtab = gt.gradient_table(model.bval, model.bvec)
> > +    elif hasattr(model, 'gtab'): # e.g. DKI
> > +        gtab = model.gtab
> > +
>
> Wait, if this function concerns only the reconstruction models the file
> should go to dipy/reconst If you can later make it more general it can go
> to dipy/core.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/nipy/dipy/pull/235/files#r6215951>
> .
>