model parameter API is very confusing. Model parameters have been refactored into the config module, which is a very pleasant experience. Now methods can be outsourced to the config file and only a few selected options should be exposed as user methods in the simulation class
parameter structure
The following parameter attributes are available
fixed_model_parameters: Property -> Dict, parses the config section of the fixed-model-parameters
free_model_parameters: List
Initialized as an empty list
set in sim.setup() from sim.set_free_model_parameters()
used in interactive backend to define widgets
property: number of free parameters
property: names of free parameters
property: names of fixed parameters
property: parses a dict with name:value pairs
used in pymoo, pyabc and numpyro to parse priors, etc.
set_free_model_parameters(): Method -> List, parses the config section free-model-parameters (or model-parameters) in the old API
uses parameter class from toopy to setup the parameters
model_parameters: dict, stores any parameters that are forwarded to the model. Is helpful for flexibility.
initialized as an empty dict,
used in sim.setup() to partially initialize the parameterize method.
Is conventionally updated in the sim.initialize method to set the fixed parameters of the model
model_parameter_values: Property -> List, from free model parameters
model_parameter_names: Property -> List, from free model parameters
model_parameter_dict: Property -> List, from free model parameters
n_free_parameters: Property -> List, from free model parameters
To summarize, model_parameters carries all necessary information for the model to execute. This will be sufficient for a minimal model version
model_parameters is a dict with the keys
parameters: which carries the arguments for model, solver and the probabilistic model
y0: starting values (this is only relevant for an initial value problem)
any other key, that should be accessible by the solver and the model
The next step is the definition of a free model parameter dict in the config file
model parameter API is very confusing. Model parameters have been refactored into the config module, which is a very pleasant experience. Now methods can be outsourced to the config file and only a few selected options should be exposed as user methods in the simulation class
parameter structure
fixed_model_parameters
: Property -> Dict, parses the config section of the fixed-model-parametersfree_model_parameters
: Listsim.setup()
fromsim.set_free_model_parameters()
pymoo
,pyabc
andnumpyro
to parse priors, etc.set_free_model_parameters()
: Method -> List, parses the config section free-model-parameters (or model-parameters) in the old APImodel_parameters
: dict, stores any parameters that are forwarded to the model. Is helpful for flexibility.sim.setup()
to partially initialize theparameterize
method.sim.initialize
method to set the fixed parameters of the modelmodel_parameter_values
: Property -> List, from free model parametersmodel_parameter_names
: Property -> List, from free model parametersmodel_parameter_dict
: Property -> List, from free model parametersn_free_parameters
: Property -> List, from free model parametersmodel_parameters
carries all necessary information for the model to execute. This will be sufficient for a minimal model versionmodel_parameters
is a dict with the keyssolver
and themodel