amici.parameter_mapping

Parameter mapping

When performing parameter inference, often parameters need to be mapped from simulation to estimation parameters, and parameters can differ between conditions. This can be handled using the ParameterMapping.

Note

While the parameter mapping can be used directly with AMICI, it was developed for usage together with PEtab, for which the whole workflow of generating the mapping is automatized.

Classes

ParameterMapping([parameter_mappings])

Parameter mapping for multiple conditions.

ParameterMappingForCondition([map_sim_var, …])

Parameter mapping for condition.

Functions Summary

amici_to_petab_scale(amici_scale)

Convert amici scale id to petab scale id.

fill_in_parameters(edatas, …)

Fill fixed and dynamic parameters into the edatas (in-place).

fill_in_parameters_for_condition(edata, …)

Fill fixed and dynamic parameters into the edata for condition (in-place).

petab_to_amici_scale(petab_scale)

Convert petab scale id to amici scale id.

scale_parameter(value, petab_scale)

Bring parameter from linear scale to target scale.

scale_parameters_dict(value_dict, …)

Bring parameters from linear scale to target scale.

unscale_parameter(value, petab_scale)

Bring parameter from scale to linear scale.

unscale_parameters_dict(value_dict, …)

Bring parameters from target scale to linear scale.

Functions

amici.parameter_mapping.amici_to_petab_scale(amici_scale)[source]

Convert amici scale id to petab scale id.

Return type

str

amici.parameter_mapping.fill_in_parameters(edatas, problem_parameters, scaled_parameters, parameter_mapping, amici_model)[source]

Fill fixed and dynamic parameters into the edatas (in-place).

Parameters
Return type

None

amici.parameter_mapping.fill_in_parameters_for_condition(edata, problem_parameters, scaled_parameters, parameter_mapping, amici_model)[source]

Fill fixed and dynamic parameters into the edata for condition (in-place).

Parameters
Return type

None

amici.parameter_mapping.petab_to_amici_scale(petab_scale)[source]

Convert petab scale id to amici scale id.

Return type

int

amici.parameter_mapping.scale_parameter(value, petab_scale)[source]

Bring parameter from linear scale to target scale.

Parameters
  • value (numbers.Number) – Value to scale

  • petab_scale (str) – Target scale of value

Return type

numbers.Number

Returns

value on target scale

amici.parameter_mapping.scale_parameters_dict(value_dict, petab_scale_dict)[source]

Bring parameters from linear scale to target scale.

Bring values in value_dict from linear scale to the scale provided in petab_scale_dict (in-place). Both arguments are expected to have the same length and matching keys.

Parameters
Return type

None

amici.parameter_mapping.unscale_parameter(value, petab_scale)[source]

Bring parameter from scale to linear scale.

Parameters
  • value (numbers.Number) – Value to scale

  • petab_scale (str) – Target scale of value

Return type

numbers.Number

Returns

value on linear scale

amici.parameter_mapping.unscale_parameters_dict(value_dict, petab_scale_dict)[source]

Bring parameters from target scale to linear scale.

Bring values in value_dict from linear scale to the scale provided in petab_scale_dict (in-place). Both arguments are expected to have the same length and matching keys.

Parameters
Return type

None