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.
global sensitivity 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, see .
use to 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, see .
use to perform mpgsa. the function requires statistics and machine learning toolbox.
elementary effects
lets 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 parameter p with respect to a model response r is defined as: .
here, eep(x) is the elementary
effect of p . r(x) and
r(x delta) are model responses at specific time or the
value of an observable, evaluated for parameter values
x
and
x delta
. for
details, see .
comparison of gsa functions
gsa function | sensitivity measure | considerations |
---|---|---|
it computes the fractions of total variance of a model response (sensitivity output) that can be attributed to individual model parameters (sensitivity inputs). |
| |
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 occupancy
|
| |
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. |
|
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 species x
, and two parameters
y
and z
, the time-dependent sensitivities
of x
with respect to each parameter value are the time-dependent derivatives
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 called forward sensitivity analysis or direct sensitivity analysis. this larger system of odes is solved simultaneously by the solver.
lsa 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, the complex-step approximation requires the functions to be
complex analytic, that is, to be infinitely differentiable in the complex plane.
this technique can produce inaccurate results when analyzing models that contain
mathematical expressions that involve nonanalytic functions, except
min
, max
, and
abs
. if the model contains nonanalytic functions,
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.
contact for additional information.
although the min
, max
, and
abs
are nonanalytic functions and are not compatible
with the complex-step approximation, simbiology provides replacements of these
functions so that they become compatible and can be used for lsa. note that:
the replacement function
is not differentiable when the real part of x is 0.
the replacement functions
and are not differentiable when x is equal to y.
for details, see [3].
if your model uses the abs
, min
,
and max
functions, simbiology automatically replaces them
when:
you calculate local sensitivities using
, a
simfunctionsensitivity
object, or the program.or uses local sensitivity analysis to determine the gradients of the objective function during parameter estimation.
note
models containing the following active components do not support local 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 the in the configuration set.
in addition, if you are estimating model parameters using
or the fit data program with one of these gradient-based estimation
functions: fmincon
, fminunc
,
lsqnonlin
, or lsqcurvefit
, simbiology uses the
sundials solver by default to calculate sensitivities and use them to improve fitting. if you
are using , you can turn off this sensitivity
calculation feature by setting the name-value pair argument to
false
. 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 the property of your
configset
object, before running the
sbiosimulate
function:
— set to
true
to calculate the time-dependent sensitivities of all the species states defined by theoutputs
property with respect to the initial conditions of the species and the values of the parameters specified ininputs
.— an object that holds the sensitivity analysis options in the configuration set object. properties of
sensitivityanalysisoptions
are:— specify the species and parameters for which you want to compute the sensitivities. this is the numerator as described in sensitivity analysis.
— specify the species and parameters with respect to which you want to compute the sensitivities. sensitivities are calculated with respect to the property of the specified species. this is the denominator, described in sensitivity analysis.
— 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, see .
after setting solveroptions
properties, calculate the
sensitivities of a model by providing the model object
as an
input argument to the function.
the sbiosimulate
function returns a containing 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
a simdata object
is a convenient way of keeping time data,
state data, sensitivity data, and associated metadata together. a
simdata object
has properties and methods associated with
it, which you can use to access and manipulate the data.
for illustrated examples, see:
calculate local sensitivities using simfunctionsensitivity object
create a
using the createsimfunction
specifying
the 'sensitivityoutputs'
and
'sensitivityinputs'
name-value pair arguments. then
execute the object. for an illustrated example, see calculate local sensitivities using simfunctionsensitivity object.
calculate local sensitivities using simbiology model analyzer app
for a workflow example using the app, see .
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 communications 181, 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 biology 9, 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.” in 38th 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.” in 39th 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 biology 222, no. 1 (may 2003): 23–36. https://doi.org/10.1016/s0022-5193(03)00011-0.