Open matteofrigo opened 4 years ago
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.
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:
_create_forward_model_matrix
fit
functionfit
function, taking into account that the look-up table must be built or loaded.fit_func
method in thefit
functionx0
as required by the solverdmipy.core.fitted_modeling_framework
fitted_distribution
property to the FittedMultiCompartmentAMICOModel and FittedMultiCompartmentAMICOSphericalMeanModel classes. This is intended to return the distribution of each parameter obtained from the AMICO fitting.fitted_parameter
property could be built on top of thefitted_distribution
.