simulation.sensitivity¶
Helpers for calculating model sensitivities and uncertainties.
Allows to get sets of changes from given model instance.
SensitivityType
¶
Bases: Enum
Type of sensitivity.
ModelSensitivity
¶
Helpers for calculating model sensitivity.
difference_sensitivity_scan
staticmethod
¶
difference_sensitivity_scan(
model,
simulation,
difference=0.1,
stype=PARAMETER_SENSITIVITY,
exclude_filter=None,
exclude_zero=True,
zero_eps=1e-08,
)
Create a parameter sensitivity scan for given TimecourseSimulation.
:param model: model for execution (needed to select parameters) :param simulation: timecourse simulation to scan :param difference: change in parameters, i.e. every parameter (which is not excluded) is changed to '(1.0 - difference) * value' and '(1.0 + difference) * value' :param stype: which sensitivity (parameters or species) :param exclude_filter: filter function which defines which parameters should be excluded from scan :param exclude_zero: parameters with a value of abs(value)<zero_eps are excluded from scan :param zero_eps: epsilon for zero values :return:
distribution_sensitivity_scan
staticmethod
¶
distribution_sensitivity_scan(
model,
simulation,
cv=0.1,
size=10,
distribution=NORMAL_DISTRIBUTION,
stype=PARAMETER_SENSITIVITY,
exclude_filter=None,
exclude_zero=True,
zero_eps=1e-08,
)
Get sensitivity scan based on distributions for values.
create_sampling_dimension
staticmethod
¶
create_sampling_dimension(
model,
changes=None,
cv=0.1,
size=10,
distribution=NORMAL_DISTRIBUTION,
stype=PARAMETER_SENSITIVITY,
exclude_filter=None,
exclude_zero=True,
zero_eps=1e-08,
)
Create list of dimensions for sampling parameter values.
Only parameters relevant for "GU_", "LI_" and "KI_" models are sampled.
cv: coeffient of variation (sigma/mean) -> sigma = cv*mean
create_difference_dimension
staticmethod
¶
create_difference_dimension(
model,
changes=None,
difference=0.1,
stype=PARAMETER_SENSITIVITY,
exclude_filter=None,
exclude_zero=True,
zero_eps=1e-08,
)
Create list of dimensions for sampling parameter values.
Only parameters relevant for "GU_", "LI_" and "KI_" models are sampled.
cv: coeffient of variation (sigma/mean) -> sigma = cv*mean
reference_dict
staticmethod
¶
reference_dict(
model,
changes=None,
stype=PARAMETER_SENSITIVITY,
exclude_filter=None,
exclude_zero=True,
zero_eps=1e-08,
)
Get key:value dict for sensitivity analysis.
Values are based on the reference state of the model with the applied changes. Values in current model state are used.
:param model: :param exclude_filter: filter function to exclude parameters, excludes parameter id if the filter function is True :param exclude_zero: exclude parameters which are zero :return:
apply_change_to_dict
staticmethod
¶
Apply relative change to reference dictionary.
:param ref_dict: {key: value} dictionary to change :param change: relative change to apply. :return: