swiftemulator.backend.model_specification module
Model specification for the emulator.
Contains the :class:ModelSpecification class,
used to input the parameter names and limits.
- class swiftemulator.backend.model_specification.ModelSpecification(number_of_parameters: int, parameter_names: List[str], parameter_limits: List[List[float]], parameter_printable_names: Optional[List[str]] = None)[source]
Bases:
objectBase specification for the model. Contains information about the names of parameters and their ranges.
- Parameters:
number_of_parameters – Total number of variable parameters in your model.
int – Total number of variable parameters in your model.
parameter_names – The names of parameters in your model; these will be used to access the parameters in :class:
ModelParameters.List[str] – The names of parameters in your model; these will be used to access the parameters in :class:
ModelParameters.parameter_limits – The lower and upper limit of the input parameters. Should be the same length as
parameter_names, but each item is a list of length two, with a lower and upper bound. For example, in a two parameter model[[0.0, 1.0], [8.3, 9.3]]would mean that the first parameter would vary between 0.0 and 1.0, with the second parameter varying between 8.3 and 9.3.List[List[float]] – The lower and upper limit of the input parameters. Should be the same length as
parameter_names, but each item is a list of length two, with a lower and upper bound. For example, in a two parameter model[[0.0, 1.0], [8.3, 9.3]]would mean that the first parameter would vary between 0.0 and 1.0, with the second parameter varying between 8.3 and 9.3.parameter_printable_names – Optional ‘fancy’ names for your parameters. These strings will be used on any figures generated through swift-emulator. Can include LaTeX formatting as in
matplotlib.List[str] – Optional ‘fancy’ names for your parameters. These strings will be used on any figures generated through swift-emulator. Can include LaTeX formatting as in
matplotlib.optional – Optional ‘fancy’ names for your parameters. These strings will be used on any figures generated through swift-emulator. Can include LaTeX formatting as in
matplotlib.
- Raises:
AttributeError – When the number of paremeters in all of the required attributes are not equal (e.g. a different number of names has been provided compared to the number of limits).
- number_of_parameters: int
- parameter_names: List[str]
- parameter_limits: List[List[float]]
- parameter_printable_names: Optional[List[str]]
- property salib_problem
Generates the
SALibproblemdictionary.