Main Content

Sensitivity Analysis in SimBiology

Sensitivity Analysis

Sensitivity analysis lets you explore the effects of variations in model quantities (species, compartments, and parameters) on a model response. You can use the analysis to validate preexisting knowledge or assumption about influential model quantities on a model response or to find such quantities. You can use the information from sensitivity analysis for decision making, designing experiments, and parameter estimation. SimBiology®supports two types of sensitivity analyses: local sensitivity analysis and global sensitivity analysis.

全球的敏感性analysis uses Monte Carlo simulations, where a representative (global) set of parameter sample values are used to explore the effects of variations in model parameters of interest on the model response. GSA provides insights into relative contributions of individual parameters that contribute most to the overall model behavior.

On the other hand, local sensitivity analysis is derivative based. This technique analyzes the effect of one model parameter at a time, keeping the other parameters fixed. Local sensitivities are dependent on a specific choice of parameter values at a time point where the analysis is performed and do not capture how parameters interact with each other during simulation when they are varied jointly.

Global Sensitivity Analysis (GSA)

In GSA, model quantities are varied together to simultaneously evaluate the relative contributions of each quantity with respect to a model response. SimBiology provides the following features to perform GSA.

Sobol Indices

In this approach, SimBiology performs a decomposition of the model output (response) variance by calculating the first- and total-order Sobol indices[1]. The first-order Sobol indices give the fractions of the overall response variance that can be attributed to variations in an input parameter alone. The total-order Sobol index gives the fraction of the overall response variance that can be attributed to joint parameter variations. For details, seeSaltelli Method to Compute Sobol Indices.

Usesbiosobolto compute the Sobol indices. The function requires Statistics and Machine Learning Toolbox™.

Multiparametric GSA (MPGSA)

MPGSA lets you study the relative importance of parameters with respect to a classifier defined by model responses. SimBiology implements the MPSA method proposed by Tiemann et al.[2]. For details, seeMultiparametric Global Sensitivity Analysis (MPGSA).

Usesbiompgsato perform MPGSA. The function requires Statistics and Machine Learning Toolbox.

Elementary Effects

sbioelementaryeffectslets you assess the global sensitivity of a model response with respect to variations in model parameters by computing the means and standard deviations of the elementary effects of input parameters. An elementary effect (EE) of an input parameterPwith respect to a model responseRis defined as: E E P ( x ) = R ( x ) R ( x + d e l t a ) .

Here,EEP(x)是elementary effect ofP.R(x)andR(x+delta)are model responses at specific time or the value of an observable, evaluated for parameter valuesxandx+delta. For details, seeElementary Effects for Global Sensitivity Analysis.

Comparison of GSA Functions

GSA Function Sensitivity Measure Considerations
sbiosobol It computes the fractions of total variance of a model response (sensitivity output) that can be attributed to individual model parameters (sensitivity inputs).
  • Variance-based method

  • Supports different distributions for sensitivity inputs

  • Computationally expensive because a large number of samples may be required to achieve convergence

sbiompgsa

It answers the question of whether variations in a model parameter (sensitivity input) have an influence on answering a modeling question. For example, the question might be: does a model parameter have an effect on the model response exceeding or falling below a target threshold?

You can define such a question using a mathematical expression (classifier). For example, the following classifier defines an exposure (area under the curve) threshold for the target occupancyTO:trapz(time,TO) <= 0.1.sbiompgsareports the difference between the distributions of samples that are accepted or rejected by the classifier.

  • 发布出去是依靠method

  • Requires a classifier that collapses time courses into a scalar value, such as max, min, mean, or AUC

  • Less computationally expensive thansbiosobol

sbioelementaryeffects

It computes the means and standard deviations of elementary effects of sensitivity inputs with respect to a model response.

It assesses the average sensitivity by linear approximations of model responses, similar to averaged local sensitivities. It also assesses if the sensitivity of a model response is the same across the input parameter domain or if there is a spread of sensitivity values across the parameter domain.

  • Screens sensitivities based on linear approximations

  • Computes the sensitivity measures over a specified parameter domain

  • More computationally expensive thansbiompgsaand slightly less expensive thansbiosobol, assuming the same number of samples is used

Local Sensitivity Analysis (LSA)

In this analysis, SimBiology calculates the time-dependent sensitivities of all the species states with respect to species initial conditions and parameter values in the model.

Thus, if a model has a speciesx, and two parametersyandz, the time-dependent sensitivities ofxwith respect to each parameter value are the time-dependent derivatives

x y , x z

where, the numerator is the sensitivity output and the denominators are the sensitivity inputs to sensitivity analysis. For more information on the calculations performed, see[3][4][5].

Model Requirements for LSA

LSA is supported only by the ordinary differential equation (ODE) solvers. SimBiology calculates local sensitivities by combining the original ODE system for a model with the auxiliary differential equations for the sensitivities. The additional equations are derivatives of the original equations with respect to parameters. This method is sometimes calledforward sensitivity analysisordirect sensitivity analysis. This larger system of ODEs is solved simultaneously by the solver.

SimBiology sensitivity analysis calculates derivatives by using a technique called complex-step approximation. This technique yields accurate results for the vast majority of typical reaction kinetics, which involve only simple mathematical operations and functions. However, this technique can produce inaccurate results when analyzing models that contain mathematical expressions that involve nonanalytic functions, such asabs. In this case, SimBiology either disables the sensitivity analysis or warns you that the computed sensitivities may be inaccurate. If sensitivity analysis gives questionable results for a model with reaction rates that contain unusual functions, you may be running into limitations of the complex-step technique. ContactMathWorks Technical Supportfor additional information.

Note

Models containing the following active components do not support sensitivity analysis:

  • Nonconstant compartments

  • Algebraic rules

  • Events

Note

You can perform sensitivity analysis on a model containing repeated assignment rules, but only if the repeated assignment rules do not determine species or parameters used as inputs or outputs in sensitivity analysis.

SUNDIALS as Default Solver

SimBiology always uses the SUNDIALS solver to perform sensitivity analysis on a model, regardless of what you have selected as theSolverTypein the configuration set.

In addition, if you are estimating model parameters usingsbiofitor the Fit Data program with one of these gradient-based estimation functions:fmincon,fminunc,lsqnonlin, orlsqcurvefit, SimBiology uses the SUNDIALS solver by default to calculate sensitivities and use them to improve fitting. If you are usingsbiofit, you can turn off this sensitivity calculation feature by setting theSensitivityAnalysisname-value pair argument tofalse. However, if you are using the Fit Data program, you cannot turn off this feature. It is recommended that you keep the sensitivity analysis feature on whenever possible for more accurate gradient approximations and better parameter fits.

Calculate Local Sensitivities Using sbiosimulate

Set the following properties of theSolverOptionsproperty of yourconfigsetobject, before running thesbiosimulatefunction:

  • SensitivityAnalysis— Set totrueto calculate the time-dependent sensitivities of all the species states defined by theOutputsproperty with respect to the initial conditions of the species and the values of the parameters specified inInputs.

  • SensitivityAnalysisOptions— An object that holds the sensitivity analysis options in the configuration set object. Properties ofSensitivityAnalysisOptionsare:

    • Outputs— Specify the species and parameters for which you want to compute the sensitivities. This is the numerator as described inSensitivity Analysis.

    • Inputs— Specify the species and parameters with respect to which you want to compute the sensitivities. Sensitivities are calculated with respect to theInitialAmountproperty of the specified species. This is the denominator, described inSensitivity Analysis.

    • Normalization— Specify the normalization for the calculated sensitivities:

      • 'None'— No normalization

      • 'Half'— Normalization relative to the numerator (species output) only

      • 'Full'— Full dedimensionalization

      For more information about normalization, seeNormalization.

After settingSolverOptionsproperties, calculate the sensitivities of a model by providing themodel objectas an input argument to thesbiosimulatefunction.

Thesbiosimulatefunction returns aSimData objectcontaining the following simulation data:

  • Time points, state data, state names, and sensitivity data

  • Metadata such as the types and names for the logged states, the configuration set used during simulation, and the date of the simulation

ASimData objectis a convenient way of keeping time data, state data, sensitivity data, and associated metadata together. ASimData objecthas properties and methods associated with it, which you can use to access and manipulate the data.

范例,请参阅:

Calculate Local Sensitivities Using SimFunctionSensitivity object

Create aSimFunctionSensitivity objectusing thecreateSimFunctionspecifying the'SensitivityOutputs'and'SensitivityInputs'name-value pair arguments. Then execute the object. For an illustrated example, seeCalculate Sensitivities Using SimFunctionSensitivity Object.

Calculate Local Sensitivities Using SimBiology Model Analyzer App

For a workflow example using the app, seeFind Important Parameters with Local Sensitivity Analysis Using SimBiology Model Analyzer App.

References

[1]Saltelli, Andrea, Paola Annoni, Ivano Azzini, Francesca Campolongo, Marco Ratto, and Stefano Tarantola. “Variance Based Sensitivity Analysis of Model Output. Design and Estimator for the Total Sensitivity Index.”Computer Physics Communications181, no. 2 (February 2010): 259–70. https://doi.org/10.1016/j.cpc.2009.09.018.

[2]Tiemann, Christian A., Joep Vanlier, Maaike H. Oosterveer, Albert K. Groen, Peter A. J. Hilbers, and Natal A. W. van Riel. “Parameter Trajectory Analysis to Identify Treatment Effects of Pharmacological Interventions.” Edited by Scott Markel.PLoS Computational Biology9, no. 8 (August 1, 2013): e1003166. https://doi.org/10.1371/journal.pcbi.1003166.

[3]Martins, Joaquim, Ilan Kroo, and Juan Alonso. “An Automated Method for Sensitivity Analysis Using Complex Variables.” In38th Aerospace Sciences Meeting and Exhibit. Reno,NV,U.S.A.: American Institute of Aeronautics and Astronautics, 2000. https://doi.org/10.2514/6.2000-689.

[4]Martins, J., Peter Sturdza, and Juan Alonso. “The Connection between the Complex-Step Derivative Approximation and Algorithmic Differentiation.” In39th Aerospace Sciences Meeting and Exhibit. Reno,NV,U.S.A.: American Institute of Aeronautics and Astronautics, 2001. https://doi.org/10.2514/6.2001-921.

[5]Ingalls, Brian P., and Herbert M. Sauro. “Sensitivity Analysis of Stoichiometric Networks: An Extension of Metabolic Control Analysis to Non-Steady State Trajectories.”Journal of Theoretical Biology222, no. 1 (May 2003): 23–36. https://doi.org/10.1016/S0022-5193(03)00011-0.