Skip to content

0.36.0

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 06:28
· 2 commits to develop since this release
ad4275f

Release notes for sbmlsim 0.36.0

sbmlsim

The uncertainty quantification of sbmlsim is faster and reaches further: the estimators of the global analyses run over every element of an observable at once instead of one call of SALib per element, a polynomial chaos expansion of a plain sample gives Sobol indices and a surrogate of a model from the points which were already simulated, and the local sensitivities of a simulation come from the forward sensitivities the engine core integrates, without a design and without a step to choose.

Features

  • The estimators of a global analysis run over every element of an observable (#601). sbmlsim.sensitivity.estimators holds the estimators of Sobol, FAST and Morris as the analyses of SALib define them, written over the whole array of the elements of an observable: a timecourse of 1000 time points is one call of the estimator and not 1000. The analyses are unchanged in what they report, the indices and their intervals agree with SALib within floating point, and SALib remains the oracle of their tests and the sampler of every design. A Sobol design of n = 1024 and five parameters costs 0.100 s for 1000 elements against 9.47 s of one call per element, Morris 0.009 s against 0.99 s and FAST 1.145 s against 9.23 s. The bootstrap of Sobol and Morris is a product with the counts of its resamples, the same mean without an array of points x resamples x elements, and the windows of FAST are one transform per parameter and resample.

  • The Sobol indices of a polynomial chaos expansion of a sample (#555, #602). sensitivity.pce is the fifth analysis: it fits an expansion of orthonormal polynomials to the points of a plain sample, a random or lhs design or the points of a sobol one, and reads the first order, total and second order indices off its coefficients, where the three global methods need a design of their own and n (d + 2) or more points. The basis is the shifted Legendre family of the unit cube of the design, whose coordinates are monotone in their own input, so the indices are the ones of the inputs whatever their marginals and no transform is needed; expansion truncates it hyperbolically (q) and caps the interactions (max_interaction), and the degree of every element of an output is chosen by its corrected leave-one-out error, one decomposition per candidate degree and all elements of an output fitted at once.

    The result carries S1, ST and, with second_order=True, S2, and next to them the loo, the degree and the mean and sd of every element, so the quality of the expansion is read beside its indices. fit_chaos gives the PolynomialChaos itself, a surrogate of the model: predict evaluates it at points which were never simulated, and its mean and variance are exact for the expansion. A design with a correlation is refused, since the share of a variance is the one of independent inputs.

  • The exact local sensitivities of a simulation (#603). sensitivity.forward reads the derivatives the engine core integrates along with the states of the model (forward sensitivities, CVODES, CV_STAGGERED) as the raw and normalized indices of the local analysis, over (parameter, time): one simulation of d parameters where the central differences of a sampling.local design need 2 d + 1, and with no step delta to choose. The reference of a normalized index is the value the parameter has at the start of the simulation, which the run delivers as a column of its own. On the repressilator the differences of a design approach the derivative the engine integrates, 3e-5 of it at delta = 1e-2 and 3e-8 at 1e-4, while at 1e-6 the roundoff of the difference grows again. Of four parameters and 201 output times the exact indices take 4.2 ms against 31.5 ms for the design, which simulates nine points and assembles the result of a scan.

    Simulator.sensitivities(model, simulation, parameters) is the simulation with those derivatives, a TimecourseSensitivities of the result, the parameters and the table over (row, column, parameter). The central differences of a design keep their place where the engine has no derivative: the derivatives are the ones of the selections of the model and not of a reduction of them, the engine refuses a simulation with changes, with a presimulation or of a model with events, and a parameter which enters the model as an exponent of a state which reaches zero has no finite derivative there.

Dependencies

  • sbmlsim-core>=0.14.0, the release which carries the forward sensitivities of a simulation on the output of its python bindings (#603).