Release notes for sbmlsim 0.55.0
The statistics of a fit and of an uncertainty analysis are computed by sbmlsim-core 0.44.0 (sbmlsim_core.stats) instead of numpy and scipy, and the Fisher information derives its statistics once, from its stored decomposition. The values, edges and messages are those of before but for the last digits and the edges listed under "Behaviour changes"; the random streams change on purpose, so a seed gives other draws than in 0.54.0.
Changes
- The statistics in sbmlsim-core (#719, follows sbmlsim-core#166). The metrics and criteria of a fit, the Fisher information, the Laplace posterior, the variability, the statistics, draws, correlations and probability statements of an uncertainty analysis (
Uncertain.interval, the precision of a propagation) and the predictive check callsbmlsim_core.stats; the python signatures and docstrings stay. The Fisher information computesJ' Jand its eigendecomposition in sbmlsim-core, so it gives the same standard errors on every machine; the stored decomposition of a record is still read back (#523). The dict of the Fisher statistics is typed assbmlsim.fit.fisher.FisherStatistics. sbmlsim-core is still imported inside the functions, soimport sbmlsimdoes not load it. - One derivation of the Fisher statistics (#720, #721).
FisherInformationgets rank, condition, covariance, standard errors and correlation from one call offisher_statistics_of_decompositionon its stored or computed decomposition (sbmlsim.fit.fisher.decomposition, the eigenvalues and the pseudo-inverse of sbmlsim-core), andFisherInformation.statisticsreturns them asFisherStatistics. The 71fisher.jsonrecords of the adopted fits of pkdb_models give bit-identical sigma2, spectrum, rank, condition, covariance, standard errors and correlation under the old and the new derivation, also with their decomposition replaced by one of LAPACK. The decomposition no longer depends on the rank tolerance: a change of the tolerance neither decomposes again nor drops the stored decomposition of a record.sampling.fit.fit_parameterscounts the constrained directions withFisherInformation.rank(it took a third rank from the eigenvalues of numpy, which ignored the stored spectrum of a record). - Distributions and special functions of sbmlsim-core (#721). The normal quantile and distribution function of
NormalandLogNormal, of the Iman-Conover scores and the copula of the random design and of the Wilson interval of the credibility, the chi-squared quantile of the profile likelihood (ProfileSettings.delta,cost_threshold) and of the records,erfof the numpy backend ofsbmlsim.scimland the gamma function of the factorial of SBML come fromsbmlsim_core.stats(norm_ppf,norm_cdf,chi2_ppf,erf,gamma). scipy stays a dependency for the optimizers,qmc.LatinHypercube,gaussian_kdeand the integrals ofUncertain.
Behaviour changes
- A seed gives other draws (#719). The draws of an uncertainty propagation (
unit_points,draw), ofVariability.drawand the virtual groups ofpredictive_checkcome from the streams of sbmlsim-core (its Sobol' sequence with LMS+shift scrambling instead of Owen's, xoshiro256++ instead of PCG64), not from scipy and numpy. The group means of a predictive check draw every call from a stream of its own, seeded per seed, mapping, size of a group and subject, where 0.54.0 shared one generator. A result stored with a seed by an earlier release reproduces only with that release; statistics of given draws do not change. - The copula of a positive semi-definite correlation takes the factor of the eigendecomposition of sbmlsim-core, so its points change, in the same distribution (#719).
- A hand-built
FisherInformationis checked (#719). A matrix which is not finite, not symmetric to1e-12of its largest entry or of no parameter raises aValueErrorin its eigenvalues, rank and condition; it gavenanor 0 before. The matrices ofJ' Jand of records are exactly symmetric and are not affected. - The condition of a singular Fisher information is
inf(#719): an exact zero eigenvalue of the Jacobi method of sbmlsim-core where LAPACK gave about 1e16. The rank is the same. - A seed is an integer below 2**64 (#719).
unit_pointsanddrawrefuse a seedNone(which drew an unseeded stream before) and a seed of 2**64 or more, as typed; the callers of sbmlsim resolveNonefirst. aic_from_mseandbic_from_msetake integernandk(#719), as typed.- A Fisher information changed in place drops its stored decomposition (#720). The fingerprint of the matrix is taken at construction, so a matrix changed in place before its first read is decomposed again; the decomposition of a record was kept with the new matrix before.
- Sampled values may change in the last digits (#721).
norm_ppf,norm_cdfanderfof sbmlsim-core equal scipy at the edges bit for bit and elsewhere to 1.4e-14 relative, so the samples ofNormal,LogNormaland the designs are not bit-identical to 0.54.0.chi2_ppfgives the value of scipy at every level and degree of freedom checked. - An unsorted stored spectrum raises (#721). The stored eigenvalues of a Fisher information (of a record) must be largest first, as sbmlsim writes them; a decomposition whose eigenvalues are not raises a
ValueErrorin the statistics instead of giving a wrong rank and condition.
Dependencies
sbmlsim-core>=0.44.0(#719, #721): the statistics, distributions and special functions above.sbmlutils>=0.19.1: fewer authoring hints which the author of a model cannot act on, e.g. nosboTermhint on theUncertaintyof every fitted parameter; the written SBML does not change.pymetadata>=0.9.2: writing a COMBINE archive over an existing one logs no warning (Omex.to_omex), which every release of a model package and every factory which regenerates its archive does.