Based on discussions with @romainbrette, this PR implements the option for TraceFitter.refine to add equations to the model that perform local forward sensitivity analysis and can therefore be used to calculate the gradient of the error function (the basic approach is detailed in this notebook). This seems to work well and increases the speed of the convergence of the refine function. In our tests with real models, it sometimes failed with a division by zero which can be avoided by initializing the responsible variable (e.g. a gating variable) with a value different from zero.
The PR also adds support for standalone mode to refine and generate, and removes some general limitations of standalone mode (e.g. now it is possible to fit several different models in the same script).
I think this is ready to merge as it is, or do you still see anything that is missing from this feature @romainbrette ?
Based on discussions with @romainbrette, this PR implements the option for
TraceFitter.refine
to add equations to the model that perform local forward sensitivity analysis and can therefore be used to calculate the gradient of the error function (the basic approach is detailed in this notebook). This seems to work well and increases the speed of the convergence of therefine
function. In our tests with real models, it sometimes failed with a division by zero which can be avoided by initializing the responsible variable (e.g. a gating variable) with a value different from zero.The PR also adds support for standalone mode to
refine
andgenerate
, and removes some general limitations of standalone mode (e.g. now it is possible to fit several different models in the same script).I think this is ready to merge as it is, or do you still see anything that is missing from this feature @romainbrette ?