swiftemulator.sensitivity.basic module
Basic sensitivity analysis based purely on the model values at consistent values in the space. No emulation is used to determine the sensitivity.
A different sensitivity analysis is ran for each dependent variable, so it is important to ensure that the functions are evaluated at consistent values.
- swiftemulator.sensitivity.basic.binwise_sensitivity(specification: ModelSpecification, parameters: ModelParameters, values: ModelValues) Dict[str, array][source]
Creates a binwise sensitivity analysis dictionary.
For each bin in dependent variable a hash is created; these are the keys in the returned dictionary.
- Parameters:
specification (ModelSpecification) – Model spec; parameter limits must be valid as these feed into the sensitivity analysis.
parameters (ModelParameters) – Parameters; these feed in as the independent variables in the sensitivity analysis.
values (ModelValues) – Dependent variables in the sensitivity analysis.
- Returns:
sensitivity – Binwise sensitivity analysis, with each array corresponding to the parameters in the order as specified by the
specification. This is the “S1” vector from the RBD FAST method.- Return type:
Dict[str, np.array]
- swiftemulator.sensitivity.basic.plot_binwise_sensitivity(specification: ModelSpecification, sensitivities: Dict[str, array], figure: Optional[Figure] = None, axes: Optional[Axes] = None, xlabel: Optional[str] = None, ylabel: Optional[str] = None, cbarlabel: Optional[str] = None, cmap: Optional[Union[str, ScalarMappable]] = None, vmin: float = -0.25, vmax: float = 0.25) Tuple[Figure, Axes][source]
Create a figure and axis displaying the output of the sensitivity analysis.