You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code should be able to fit the free parameters, P, of a model, m(P, x0), to determine the best possible match to some given experimental results, r(x0). The fitting code should allow for usage of various third-party codes capable of minimizing the difference between the model prediction, m(P,x0), and the expected result, r(x0), by determining for which P the objective function abs(m(P,x0) - r(x0)) is at a minimum.
To make different minimizers easily accessible in the code these should be fetched from a factory. For a minimizer to be in the factory it needs to inherit from the minimizer interface class, which enforces that the given minimizer implements a given set of methods. This then guarantees that a minimizer provided by the factory satisfies the minimizer interface and the factory can serve as the entry point from the fitter to any minimizers. Note that the fitter can only use methods defined in the minimizer interface.
To achieve this there are three levels of abstraction.
Fitter what is exposed to our domain code.
Minimizer wraps methods and translate data of a third-party code to make it usable by our Fitter.
MinimizerEngine a third-party code that implements a given minimization algorithm(s). API is defined by and own by third-party.
The following lists the needed code parts.
Fitter
Single class.
It gets access to any of the supported MinimizerEngine from the MinimizerFactory
The Fitter is exchanging data with our domain model.
MinimizerFactory
Single class / function.
All contained Minimizer implements the interface defined by MinimizerBase.
It provides a requested Minimizer.
MinimizerBase
Single abstract class.
It defines the required interface methods expected by the Fitter.
Minimizer
Multiple classes.
It inherit from MinimizerBase.
It wraps a MinimizerEngine to expose the functionality that is required by the MinimizerBase.
It translates our domain data into a format that the given MinimizerEngine is able to used
It translates other input into something the given MinimizerEngine understand
Constraints
Parameters
It translates the data produce by the given MinimizerEngine into our domain
MinimizerEngine
Multiple classes.
This is a third-party python code with a given API.
It should be able to do a pip install or similar to pull the python code.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
General
The code should be able to fit the free parameters, P, of a model, m(P, x0), to determine the best possible match to some given experimental results, r(x0). The fitting code should allow for usage of various third-party codes capable of minimizing the difference between the model prediction, m(P,x0), and the expected result, r(x0), by determining for which P the objective function abs(m(P,x0) - r(x0)) is at a minimum.
To make different minimizers easily accessible in the code these should be fetched from a factory. For a minimizer to be in the factory it needs to inherit from the minimizer interface class, which enforces that the given minimizer implements a given set of methods. This then guarantees that a minimizer provided by the factory satisfies the minimizer interface and the factory can serve as the entry point from the fitter to any minimizers. Note that the fitter can only use methods defined in the minimizer interface.
To achieve this there are three levels of abstraction.
Fitter
what is exposed to our domain code.Minimizer
wraps methods and translate data of a third-party code to make it usable by ourFitter
.MinimizerEngine
a third-party code that implements a given minimization algorithm(s). API is defined by and own by third-party.The following lists the needed code parts.
Fitter
Single class.
It gets access to any of the supported
MinimizerEngine
from theMinimizerFactory
The
Fitter
is exchanging data with our domain model.MinimizerFactory
Single class / function.
All contained
Minimizer
implements the interface defined byMinimizerBase
.It provides a requested
Minimizer
.MinimizerBase
Single abstract class.
It defines the required interface methods expected by the
Fitter
.Minimizer
Multiple classes.
It inherit from
MinimizerBase
.It wraps a
MinimizerEngine
to expose the functionality that is required by theMinimizerBase
.It translates our domain data into a format that the given
MinimizerEngine
is able to usedIt translates other input into something the given
MinimizerEngine
understandIt translates the data produce by the given
MinimizerEngine
into our domainMinimizerEngine
Multiple classes.
This is a third-party python code with a given API.
It should be able to do a pip install or similar to pull the python code.
Beta Was this translation helpful? Give feedback.
All reactions