dmipy icon indicating copy to clipboard operation
dmipy copied to clipboard

FEAT: add skeleton for amico implementation

Open matteofrigo opened this issue 4 years ago • 1 comments

With this PR we add the skeleton for the implementation of AMICO. Let's open the discussion @Sara04 @rutgerfick .

dmipy.core.modeling_framework

For the MultiCompartmentAMICOModel and the MultiCompartmentAMICOSphericalMeanModel we have to do the following:

  • Implement _create_forward_model_matrix
  • Choose a strategy for the solver to use. The difficulty stands in keeping the syntax consistent with the other models
  • Update documentation of fit function
  • Complete the setup of the optimization before model fitting in the fit function, taking into account that the look-up table must be built or loaded.
  • Implement the fit_func method in the fit function
  • Preprocess the x0 as required by the solver
  • Implement the multi-tissue feature correctly

dmipy.core.fitted_modeling_framework

  • I added the fitted_distribution property to the FittedMultiCompartmentAMICOModel and FittedMultiCompartmentAMICOSphericalMeanModel classes. This is intended to return the distribution of each parameter obtained from the AMICO fitting.
  • The fitted_parameter property could be built on top of the fitted_distribution.

matteofrigo avatar Apr 30 '20 13:04 matteofrigo

As for the creation of the AMICO solver, I think we should build the skeleton the same as for https://github.com/AthenaEPI/dmipy/blob/master/dmipy/optimizers_fod/csd_cvxpy.py.

So without a lookup-table, I think in the first iteration we just build the M-matrix on-the-fly in the main call of the class.

In a next iteration we prepare the look-up table etc in the init, and then use that in the call to speed up the process.

However, since we're using multi-processing we have to consider that a lookup table is a big piece of memory and it will be painful to keep creating processes with this block of data, but we'll tackle this problem when we get there.

rutgerfick avatar May 01 '20 20:05 rutgerfick