Skip to content

0.55.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 18:18
· 4 commits to develop since this release
65beaee

Release notes for sbmlsim 0.55.0

sbmlsim

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 call sbmlsim_core.stats; the python signatures and docstrings stay. The Fisher information computes J' J and 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 as sbmlsim.fit.fisher.FisherStatistics. sbmlsim-core is still imported inside the functions, so import sbmlsim does not load it.
  • One derivation of the Fisher statistics (#720, #721). FisherInformation gets rank, condition, covariance, standard errors and correlation from one call of fisher_statistics_of_decomposition on its stored or computed decomposition (sbmlsim.fit.fisher.decomposition, the eigenvalues and the pseudo-inverse of sbmlsim-core), and FisherInformation.statistics returns them as FisherStatistics. The 71 fisher.json records 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_parameters counts the constrained directions with FisherInformation.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 Normal and LogNormal, 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, erf of the numpy backend of sbmlsim.sciml and the gamma function of the factorial of SBML come from sbmlsim_core.stats (norm_ppf, norm_cdf, chi2_ppf, erf, gamma). scipy stays a dependency for the optimizers, qmc.LatinHypercube, gaussian_kde and the integrals of Uncertain.

Behaviour changes

  • A seed gives other draws (#719). The draws of an uncertainty propagation (unit_points, draw), of Variability.draw and the virtual groups of predictive_check come 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 FisherInformation is checked (#719). A matrix which is not finite, not symmetric to 1e-12 of its largest entry or of no parameter raises a ValueError in its eigenvalues, rank and condition; it gave nan or 0 before. The matrices of J' J and 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_points and draw refuse a seed None (which drew an unseeded stream before) and a seed of 2**64 or more, as typed; the callers of sbmlsim resolve None first.
  • aic_from_mse and bic_from_mse take integer n and k (#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_cdf and erf of sbmlsim-core equal scipy at the edges bit for bit and elsewhere to 1.4e-14 relative, so the samples of Normal, LogNormal and the designs are not bit-identical to 0.54.0. chi2_ppf gives 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 ValueError in 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. no sboTerm hint on the Uncertainty of 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.