pycotools3.tasks.ParameterEstimation.Context¶
-
class
pycotools3.tasks.ParameterEstimation.
Context
(models, experiments, working_directory=None, context='s', parameters='mg', filename=None, validation_experiments={}, settings={})¶ A high level interface to create a
ParameterEstimation.Config
object.Enables the construction of a
ParameterEstimation.Config
object assuming one of several common patterns of usage.Examples
Assuming that we have two copasi models (mod1 and mod2) and two experimental data files (fname1, fname2), correctly formatted according to the copasi specification. We can generate a config object that specifies the fitting of both experiments to both models and to fit all global and local parameters parameters=’gl’ in each.
with ParameterEstimation.Context( [mod1, mod2], [fname1, fname2], context='s', parameters='gl') as context: context.set('method', 'genetic_algorithm_sr') context.set('number_of_generations', 25) context.set('population_size', 10) config = context.get_config() pe = ParameterEstimation(config)
Or for profile likelihoods on the first model mod1
-
__init__
(models, experiments, working_directory=None, context='s', parameters='mg', filename=None, validation_experiments={}, settings={})¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(models, experiments[, …])Initialize self. get_config
()set
(parameter, value)Set the value of parameter
tovalue
.Attributes
acceptable_context_args
acceptable_parameters_args
experiment_filetypes
-
get_config_cv
()¶ configure for cross validation Returns:
-
get_config_pl
()¶ configure for profile likelihoods Returns:
-
set
(parameter, value)¶ Set the value of
parameter
tovalue
.Looks for the first instance of
parameter
and sets its value tovalue
.Parameters: - parameter – A key somewhere in the nested structure of the config object
- value – A value to replace the current value with
Returns: None
-