Notebook on nbviewer (original) (raw)


Accuracy

In order to test the accuracy of the libraries and algorithms we perform 10,000 independent simulations of a model.The simulated results are compared with analytical results at t=0,1,...,50 to obtain the accuracy. The following equations were used to test for the accuracy. The equations are different for the exact and approximate algorithms, as recommended by the SBML Test Suite.

Exact simulations

Two test statistics are used to score the accuracy, ZtZ_tZt and YtY_tYt.

Ztequivsqrtnleft(frachatXt−mutsigmatright)Z_t \equiv \sqrt{n} \left( \frac{\hat{X}_t - \mu_t}{\sigma_t} \right)Ztequivsqrtnleft(frachatXtmutsigmatright)Ytequivsqrtfracn2left(frachatS2tsigma2t−1right)Y_t \equiv \sqrt{\frac{n}{2}} \left( \frac{\hat{S}^2_t}{\sigma^2_t} - 1 \right)Ytequivsqrtfracn2left(frachatS2tsigma2t1right)

Symbol Parameter
mut\mu_tmut Analytical mean of species counts at time ttt
sigmat\sigma_tsigmat Analytical standard deviation of species counts at time ttt
hatXt\hat{X}_thatXt Observed mean of species counts at time ttt
hatSt\hat{S}_thatSt Observed standard deviation of species counts at time ttt
nnn Number of repetitions of the simulations to generate the sample
ZtZ_tZt is expected to fall in the interval [-3, 3], whereas YtY_tYt is expected to fall in the interval [-5, 5].

Score

We computed the accuracy score as the percentage of times ZtZ_tZt and YtY_tYt fall in their expected intervals. For models with a single species, there are 50 mean tests + 50 std. dev. tests, since there are 50 time points. For models with two species, there are 100 mean tests + 100 std. dev. tests.

Approximate simulations

At=hatXt/mutA_t = \hat{X}_t / \mu_tAt=hatXt/mutBt=hatSt/sigmatB_t = \hat{S}_t / \sigma_tBt=hatSt/sigmat AtA_tAt and BtB_tBt are expected to fall in the interval [0.98, 1.02].

Score

We computed the accuracy score as the percentage of times AtA_tAt and BtB_tBt fall in their expected intervals. For models with a single species, there are 50 mean tests + 50 std. dev. tests, since there are 50 time points. For models with two species, there are 100 mean tests + 100 std. dev. tests.