diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/articles/FOCUS_D.html | 6 | ||||
-rw-r--r-- | docs/articles/FOCUS_L.html | 40 | ||||
-rw-r--r-- | docs/articles/compiled_models.html | 28 | ||||
-rw-r--r-- | docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png | bin | 10199 -> 9755 bytes | |||
-rw-r--r-- | docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png | bin | 12764 -> 11237 bytes |
5 files changed, 37 insertions, 37 deletions
diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index de1e1072..50b3d00a 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -132,8 +132,8 @@ <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(fit)</code></pre></div> <pre><code>## mkin version: 0.9.45 ## R version: 3.3.2 -## Date of fit: Thu Dec 8 09:23:12 2016 -## Date of summary: Thu Dec 8 09:23:13 2016 +## Date of fit: Thu Dec 8 09:39:23 2016 +## Date of summary: Thu Dec 8 09:39:24 2016 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent @@ -141,7 +141,7 @@ ## ## Model predictions using solution type deSolve ## -## Fitted with method Port using 153 model solutions performed in 0.639 s +## Fitted with method Port using 153 model solutions performed in 0.627 s ## ## Weighting: none ## diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html index a6ec5532..366a0e46 100644 --- a/docs/articles/FOCUS_L.html +++ b/docs/articles/FOCUS_L.html @@ -79,15 +79,15 @@ FOCUS_2006_L1_mkin <-<span class="st"> </span><span class="kw"><a href="../re <span class="kw">summary</span>(m.L1.SFO)</code></pre></div> <pre><code>## mkin version: 0.9.45 ## R version: 3.3.2 -## Date of fit: Thu Dec 8 09:23:13 2016 -## Date of summary: Thu Dec 8 09:23:13 2016 +## Date of fit: Thu Dec 8 09:39:24 2016 +## Date of summary: Thu Dec 8 09:39:24 2016 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 37 model solutions performed in 0.088 s +## Fitted with method Port using 37 model solutions performed in 0.084 s ## ## Weighting: none ## @@ -172,8 +172,8 @@ FOCUS_2006_L1_mkin <-<span class="st"> </span><span class="kw"><a href="../re <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.L1.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> <pre><code>## mkin version: 0.9.45 ## R version: 3.3.2 -## Date of fit: Thu Dec 8 09:23:14 2016 -## Date of summary: Thu Dec 8 09:23:14 2016 +## Date of fit: Thu Dec 8 09:39:25 2016 +## Date of summary: Thu Dec 8 09:39:25 2016 ## ## ## Warning: Optimisation by method Port did not converge. @@ -269,15 +269,15 @@ FOCUS_2006_L2_mkin <-<span class="st"> </span><span class="kw"><a href="../re <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.L2.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> <pre><code>## mkin version: 0.9.45 ## R version: 3.3.2 -## Date of fit: Thu Dec 8 09:23:14 2016 -## Date of summary: Thu Dec 8 09:23:14 2016 +## Date of fit: Thu Dec 8 09:39:26 2016 +## Date of summary: Thu Dec 8 09:39:26 2016 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 81 model solutions performed in 0.185 s +## Fitted with method Port using 81 model solutions performed in 0.183 s ## ## Weighting: none ## @@ -339,8 +339,8 @@ FOCUS_2006_L2_mkin <-<span class="st"> </span><span class="kw"><a href="../re <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.L2.DFOP, <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> <pre><code>## mkin version: 0.9.45 ## R version: 3.3.2 -## Date of fit: Thu Dec 8 09:23:15 2016 -## Date of summary: Thu Dec 8 09:23:15 2016 +## Date of fit: Thu Dec 8 09:39:27 2016 +## Date of summary: Thu Dec 8 09:39:27 2016 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * @@ -349,7 +349,7 @@ FOCUS_2006_L2_mkin <-<span class="st"> </span><span class="kw"><a href="../re ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 336 model solutions performed in 0.765 s +## Fitted with method Port using 336 model solutions performed in 0.771 s ## ## Weighting: none ## @@ -428,8 +428,8 @@ mm.L3 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(mm.L3[[<span class="st">"DFOP"</span>, <span class="dv">1</span>]])</code></pre></div> <pre><code>## mkin version: 0.9.45 ## R version: 3.3.2 -## Date of fit: Thu Dec 8 09:23:17 2016 -## Date of summary: Thu Dec 8 09:23:17 2016 +## Date of fit: Thu Dec 8 09:39:28 2016 +## Date of summary: Thu Dec 8 09:39:28 2016 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * @@ -438,7 +438,7 @@ mm.L3 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 137 model solutions performed in 0.309 s +## Fitted with method Port using 137 model solutions performed in 0.304 s ## ## Weighting: none ## @@ -528,15 +528,15 @@ mm.L4 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(mm.L4[[<span class="st">"SFO"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> <pre><code>## mkin version: 0.9.45 ## R version: 3.3.2 -## Date of fit: Thu Dec 8 09:23:17 2016 -## Date of summary: Thu Dec 8 09:23:17 2016 +## Date of fit: Thu Dec 8 09:39:28 2016 +## Date of summary: Thu Dec 8 09:39:29 2016 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 46 model solutions performed in 0.106 s +## Fitted with method Port using 46 model solutions performed in 0.107 s ## ## Weighting: none ## @@ -588,15 +588,15 @@ mm.L4 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(mm.L4[[<span class="st">"FOMC"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> <pre><code>## mkin version: 0.9.45 ## R version: 3.3.2 -## Date of fit: Thu Dec 8 09:23:17 2016 -## Date of summary: Thu Dec 8 09:23:17 2016 +## Date of fit: Thu Dec 8 09:39:28 2016 +## Date of summary: Thu Dec 8 09:39:29 2016 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 66 model solutions performed in 0.148 s +## Fitted with method Port using 66 model solutions performed in 0.145 s ## ## Weighting: none ## diff --git a/docs/articles/compiled_models.html b/docs/articles/compiled_models.html index 660af1d1..457f5a1d 100644 --- a/docs/articles/compiled_models.html +++ b/docs/articles/compiled_models.html @@ -99,21 +99,21 @@ mb<span class="fl">.1</span> <-<span class="st"> </span><span class="kw">micr <span class="kw">print</span>(mb<span class="fl">.1</span>)</code></pre></div> <pre><code>## Unit: milliseconds ## expr min lq mean median uq -## deSolve, not compiled 5006.3815 5014.4629 5112.7115 5022.5443 5165.8765 -## Eigenvalue based 840.3027 874.3549 892.0593 908.4071 917.9376 -## deSolve, compiled 706.9909 712.8031 723.4380 718.6154 731.6615 +## deSolve, not compiled 5185.0893 5231.5690 5266.8769 5278.0487 5307.7706 +## Eigenvalue based 843.3153 847.1503 876.5398 850.9853 893.1520 +## deSolve, compiled 723.0636 740.5682 755.9995 758.0729 772.4674 ## max neval cld -## 5309.2087 3 b -## 927.4680 3 a -## 744.7077 3 a</code></pre> +## 5337.4926 3 b +## 935.3187 3 a +## 786.8620 3 a</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">autoplot</span>(mb<span class="fl">.1</span>)</code></pre></div> <p><img src="compiled_models_files/figure-html/benchmark_SFO_SFO-1.png" width="672"></p> <p>We see that using the compiled model is by a factor of 7 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs:</p> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">rownames</span>(smb<span class="fl">.1</span>) <-<span class="st"> </span>smb<span class="fl">.1</span>$expr smb<span class="fl">.1</span>[<span class="st">"median"</span>]/smb<span class="fl">.1</span>[<span class="st">"deSolve, compiled"</span>, <span class="st">"median"</span>]</code></pre></div> <pre><code>## median -## deSolve, not compiled 6.989197 -## Eigenvalue based 1.264108 +## deSolve, not compiled 6.962456 +## Eigenvalue based 1.122564 ## deSolve, compiled 1.000000</code></pre> </div> <div id="model-that-can-not-be-solved-with-eigenvalues" class="section level2"> @@ -134,19 +134,19 @@ smb<span class="fl">.1</span>[<span class="st">"median"</span>]/smb<span class=" <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">smb<span class="fl">.2</span> <-<span class="st"> </span><span class="kw">summary</span>(mb<span class="fl">.2</span>) <span class="kw">print</span>(mb<span class="fl">.2</span>)</code></pre></div> <pre><code>## Unit: seconds -## expr min lq mean median uq -## deSolve, not compiled 11.015990 11.17783 11.24827 11.339674 11.364403 -## deSolve, compiled 1.285264 1.29794 1.32988 1.310616 1.352189 +## expr min lq mean median uq +## deSolve, not compiled 10.963655 10.992677 11.033360 11.02170 11.068212 +## deSolve, compiled 1.287898 1.309754 1.322972 1.33161 1.340509 ## max neval cld -## 11.389132 3 b -## 1.393762 3 a</code></pre> +## 11.114726 3 b +## 1.349408 3 a</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">smb<span class="fl">.2</span>[<span class="st">"median"</span>]/smb<span class="fl">.2</span>[<span class="st">"deSolve, compiled"</span>, <span class="st">"median"</span>]</code></pre></div> <pre><code>## median ## 1 NA ## 2 NA</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">autoplot</span>(mb<span class="fl">.2</span>)</code></pre></div> <p><img src="compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png" width="672"></p> -<p>Here we get a performance benefit of a factor of 8.7 using the version of the differential equation model compiled from C code!</p> +<p>Here we get a performance benefit of a factor of 8.3 using the version of the differential equation model compiled from C code!</p> <p>This vignette was built with mkin 0.9.45 on</p> <pre><code>## R version 3.3.2 (2016-10-31) ## Platform: x86_64-pc-linux-gnu (64-bit) diff --git a/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png b/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png Binary files differindex 53ff97f7..dae2c9d4 100644 --- a/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png +++ b/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png diff --git a/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png b/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png Binary files differindex d3a507bd..696236dc 100644 --- a/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png +++ b/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png |