Repository navigation
Release notes for sbmlsim 0.15.0
A release of the likelihood and of PEtab v2. A fit minimizes the negative log-likelihood of the noise models of PEtab or the log posterior with the priors, so the standard deviations of the noise are estimated with the parameters of the model. sbmlsim reads PEtab v2 only: the PEtab test suite (149 of 149 cases, the ones of PEtab v1 converted) and the benchmark collection (at its newest commit, against AMICI 1.2.0) run in PEtab v2. Geometric means are fitted with their geometric standard deviations, and the events of a model evaluate every function of the math of SBML when a change triggers them.
Results which change: a PEtab problem read without the sbmlsim extension is fitted by maximum likelihood (before by least squares), the events which a change triggers and whose math has a function PEtab names otherwise or does not have (they fire now), the sciml formulas with a division by a number (computed as written), and a PEtab problem of PEtab v1, which from_petab refuses.
Features
- The likelihood and the posterior as the objective of a fit (#428, #430).
FitSettings(objective=...)isleast_squares(the weighted least squares, the default of a fit defined in python),likelihood(the negative log-likelihood of the training data under the noise model of every mapping,FitMapping.noise, else the normal noise of the errors of the data) orposterior(with the priors of the parameters, the maximum a posteriori estimate). A parameter of a noise formula, e.g. the standard deviationsd_<observable>, is estimated with the parameters of the model. The likelihood is written as residuals for the least squares optimizer, the residual of the data and one of the scale of the noise per point, and the cost of a fit is the negative log-likelihood or log posterior itself, so the threshold of the profile likelihood is the likelihood ratio. A PEtab problem read without thesbmlsimextension is fitted withlikelihood, as PEtab defines its objective.Boehm_JProteomeRes2014reaches the log-likelihood of the benchmark collection (-138.30 against -138.22) with its three standard deviations estimated,Perelson_Science1996hasc,deltaand the standard deviation identifiable. - The PEtab v2 tutorial as a simulation experiment (#430).
examples/petab/tutorialdefines the problem of the tutorial of PEtab v2 (Boehm et al. 2014) in python: the experimentepo_stimulation, the observables asObservableModel, the noise of a placeholder filled with the estimated standard deviations.python -m examples.petab.tutorialwrites it withto_petab, compares the tables with the ones of the tutorial, reads it back and fits it. - Geometric means are fitted with their geometric SDs (#403, #426).
FitData(yid="gmean", yid_gsd="gsd")declares the error of geometric means as their geometric standard deviation, a factor without a unit. A point has the standard deviation of the log-normal distribution with that geometric CV,gmean * sqrt(exp(log(gsd)^2) - 1), for the residuals and the weights, its noise is log-normal withlog(gsd)in the likelihood and the PEtab export, the reader reads such noise back as geometric SDs, and the report draws the error bars fromgmean / gsdtogmean * gsd. - Events evaluate every function of the math of SBML at a change (#299, #419). The trigger, the priority and the assignments of an event which a change triggers are compiled from their MathML with sbmlmath (
sbmlsim.sbml_math.compile_math) instead of being written as math of PEtab:floor,ceiling,factorial,quotient,rem,root,xor,implies, relations of more than two arguments, the inverse trigonometric functions,infinity,notanumberand function definitions fire the event at the change as roadrunner fires it during the integration. OnlyrateOfanddelayare still reported. The values are the doubles roadrunner computes (NaN for the root of a negative number, infinity for a division by zero).
Changes
- PEtab v2 only (#211, #427).
PetabReader.from_yamlrefuses a problem of PEtab v1.sbmlsim.fit.petab_v2.conversion.convert_v1converts one withpetab.v2.petab1to2together with its reference simulations, which get the experiments of the measurements.create_petab_omexpackages PEtab v2, the examples vendor their problems in PEtab v2. A parameter without a scale whose lower bound is not positive, e.g.log10_kof the encodings of PEtab v2 of the benchmark collection, is searched on the linear scale; the gapsciml-parameter-scaleisparameter-scale. - The PEtab test suite runs its cases of PEtab v1 as well (#427). The suite is pinned to its newest commit, its 20 cases of PEtab v1 are converted to PEtab v2 at the download and run as the group
v1/sbml: 149 of 149 cases pass. - The benchmark collection at its newest commit, against AMICI 1.2.0 (#427, #429). A problem is its encoding of PEtab v2 of the collection where it has one, else converted with its simulations.
Froehlich_CellSystems2018is excluded, it takes longer than a problem gets,Crauste_CellSystems2017is simulated with a tighter integrator. 28 of 34 problems pass. The other six were checked: the simulation tables ofFujita_SciSignal2010,Sneyd_PNAS2002,Zheng_PNAS2012,Perelson_Science1996andChen_MSB2009are not the models at their nominal parameters: the log-likelihood of sbmlsim agrees with the one of AMICI where the one of the tables does not, AMICI 1.2.0 reproduces the simulations of sbmlsim ofChen_MSB2009to 4e-6 and SciPy the ones ofPerelson_Science1996(regenerated in Benchmark-Models-PEtab#343), and the reference log-likelihood ofChen_MSB2009of AMICI is stale (AMICI-dev/AMICI#3503); the log-likelihood ofCrauste_CellSystems2017is 1.2e-3 off the one of AMICI.
Fixes
- evaluate_formula of sciml computes the operations as written (#420, #424). The formulas of the derived changes and the inputs of a network read the numbers as rationals and let sympy evaluate the expression:
q / 49was0.9999999999999999forq = 49,rem(q, 49)was49andquotient(q, 49)was0. They are evaluated withsbml_math.math_function, the operations as written and every number the double of its text; the Avogadro constant is the value roadrunner evaluates. - A concentration over a dimensionless volume has the unit of its substance (#425).
Units.quotientwroteitem/for a species of the unititemin a compartment of a dimensionless unit, which pint does not read, so the benchmark problemOliveira_NatCommun2021failed to read its measurements. - The PEtab test suite no longer fills an empty column of floats with text, which pandas 4 refuses (#425).
Dependencies
- petab 0.10.0 or newer is required, its
petab1to2converts an observable on the scalelog10to log-normal noise of the same density.