diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2015-06-19 17:46:11 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2015-06-19 17:46:11 +0200 |
commit | ec574cff822a1238138c0aa69b3d1459bdc3dfa8 (patch) | |
tree | ed35e64ca0a2e51b0974e7fa3efd768aa5bc446a /vignettes | |
parent | 6281424beafe531c9891670c3227ab12e9a21990 (diff) |
Use odeintr instead of ccSolve for compiling modelsodeintr
Diffstat (limited to 'vignettes')
-rw-r--r-- | vignettes/FOCUS_D.Rmd | 2 | ||||
-rw-r--r-- | vignettes/FOCUS_D.html | 16 | ||||
-rw-r--r-- | vignettes/FOCUS_Z.pdf | bin | 215014 -> 223035 bytes | |||
-rw-r--r-- | vignettes/compiled_models.Rmd | 35 | ||||
-rw-r--r-- | vignettes/compiled_models.html | 63 |
5 files changed, 51 insertions, 65 deletions
diff --git a/vignettes/FOCUS_D.Rmd b/vignettes/FOCUS_D.Rmd index 902d3d24..f3dd6661 100644 --- a/vignettes/FOCUS_D.Rmd +++ b/vignettes/FOCUS_D.Rmd @@ -27,7 +27,7 @@ kinetics (SFO) to one metabolite named m1, which also degrades with SFO kinetics The call to mkinmod returns a degradation model. The differential equations represented in
R code can be found in the character vector `$diffs` of the `mkinmod` object. If
-the `ccSolve` package is installed and functional, the differential equation model
+a compiler (g++) is installed and functional, the differential equation model
will be compiled from auto-generated C code.
diff --git a/vignettes/FOCUS_D.html b/vignettes/FOCUS_D.html index 6573cc7a..9522e881 100644 --- a/vignettes/FOCUS_D.html +++ b/vignettes/FOCUS_D.html @@ -276,13 +276,13 @@ kinetics (SFO) to one metabolite named m1, which also degrades with SFO kinetics <p>The call to mkinmod returns a degradation model. The differential equations represented in R code can be found in the character vector <code>$diffs</code> of the <code>mkinmod</code> object. If -the <code>ccSolve</code> package is installed and functional, the differential equation model +a compiler (g++) is installed and functional, the differential equation model will be compiled from auto-generated C code.</p> <pre><code class="r">SFO_SFO <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) </code></pre> -<pre><code>## Compiling differential equation model from auto-generated C code... +<pre><code>## Compiling differential equation model from auto-generated C++ code... </code></pre> <pre><code class="r">print(SFO_SFO$diffs) @@ -312,7 +312,7 @@ using the <code>plot</code> method for <code>mkinfit</code> objects.</p> <pre><code class="r">mkinparplot(fit) </code></pre> -<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfgAAAH4CAMAAACR9g9NAAACnVBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcKCgoMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUXFxcYGBgZGRkbGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkrKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVXV1dYWFhaWlpbW1tcXFxdXV1fX19gYGBiYmJjY2NlZWVmZmZnZ2doaGhpaWlqampsbGxtbW1vb29wcHBxcXFycnJ0dHR1dXV2dnZ3d3d4eHh5eXl6enp7e3t9fX1+fn5/f3+AgICBgYGCgoKDg4OEhISGhoaHh4eIiIiJiYmKioqLi4uMjIyNjY2Ojo6QkJCUlJSVlZWWlpaXl5eYmJiZmZmampqbm5ucnJyfn5+goKChoaGioqKlpaWmpqanp6eoqKipqamqqqqrq6usrKyxsbGzs7O0tLS1tbW2tra3t7e4uLi5ubm6urq7u7u8vLy9vb2+vr6/v7/AwMDBwcHDw8PExMTFxcXIyMjJycnKysrLy8vMzMzNzc3Ozs7Pz8/Q0NDR0dHS0tLT09PU1NTV1dXW1tbX19fY2NjZ2dna2trb29vc3Nzd3d3e3t7f39/g4ODh4eHi4uLk5OTl5eXm5ubn5+fo6Ojp6en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b822cetJFkLuHihxguRQ5YExMkkym+a1D5pOUdap7RtdfvUxC090mf/eKjnpG8PED5P1ZN7Ef9eXk033ApcsCamCBps/jYZ/TyjCobObFBx/8gZYON7+mYoKVCV5F80KdHpPxuoI1vanMJfVMWlfiKV0p52B26FPzDspggm8XHBB3Nb2xubvYmH1Q37KRv870KnpHG1is+JuhfI890rFhkJ8lUQs/NNevW+df8HQUvBf+wLCbIbvHRQW/6X182omKe0a7bh95/VsEzknaLjwn6U3bW4m/sJJniGzigWDwoFg+KxYP6PxXUkHh/D33ZAAAAAElFTkSuQmCC" alt="plot of chunk unnamed-chunk-6"/> </p> <p>A comprehensive report of the results is obtained using the <code>summary</code> method for <code>mkinfit</code> objects.</p> @@ -322,16 +322,16 @@ objects.</p> <pre><code>## mkin version: 0.9.36 ## R version: 3.2.0 -## Date of fit: Fri Jun 5 14:20:31 2015 -## Date of summary: Fri Jun 5 14:20:31 2015 +## Date of fit: Fri Jun 19 16:21:21 2015 +## Date of summary: Fri Jun 19 16:21:21 2015 ## ## Equations: ## d_parent = - k_parent_sink * parent - k_parent_m1 * parent ## d_m1 = + k_parent_m1 * parent - k_m1_sink * m1 ## -## Model predictions using solution type deSolve +## Model predictions using solution type odeintr ## -## Fitted with method Port using 153 model solutions performed in 0.621 s +## Fitted with method Port using 153 model solutions performed in 0.562 s ## ## Weighting: none ## @@ -370,7 +370,7 @@ objects.</p> ## parent_0 1.00000 0.6075 -0.06625 -0.1701 ## log_k_parent_sink 0.60752 1.0000 -0.08740 -0.6253 ## log_k_parent_m1 -0.06625 -0.0874 1.00000 0.4716 -## log_k_m1_sink -0.17006 -0.6253 0.47163 1.0000 +## log_k_m1_sink -0.17006 -0.6253 0.47164 1.0000 ## ## Residual standard error: 3.211 on 36 degrees of freedom ## diff --git a/vignettes/FOCUS_Z.pdf b/vignettes/FOCUS_Z.pdf Binary files differindex 3174a23a..e2a4baa9 100644 --- a/vignettes/FOCUS_Z.pdf +++ b/vignettes/FOCUS_Z.pdf diff --git a/vignettes/compiled_models.Rmd b/vignettes/compiled_models.Rmd index bac284c5..b6d54710 100644 --- a/vignettes/compiled_models.Rmd +++ b/vignettes/compiled_models.Rmd @@ -15,22 +15,20 @@ output: ```{r, include = FALSE}
library(knitr)
opts_chunk$set(tidy = FALSE, cache = TRUE)
-if (!require("ccSolve"))
- message("Please install the ccSolve package for this vignette to produce sensible output")
-
```
# Benchmark for a model that can also be solved with Eigenvalues
This evaluation is taken from the example section of mkinfit. When using an mkin version
-greater than 0.9-36 and the ccSolve package is installed and functional, you will get a
-message that the model is being compiled when defining a model using mkinmod.
+greater or equal than 0.9-36 and the C++ compiler g++ is installed and functional (on Windows,
+install Rtools), you will get a message that the model is being compiled when
+defining a model using mkinmod.
```{r create_SFO_SFO}
library("mkin")
SFO_SFO <- mkinmod(
parent = list(type = "SFO", to = "m1", sink = TRUE),
- m1 = list(type = "SFO"))
+ m1 = list(type = "SFO"), odeintr_compile = "yes")
```
We can compare the performance of the Eigenvalue based solution against the
@@ -39,28 +37,23 @@ the microbenchmark package. ```{r benchmark_SFO_SFO, echo=-(1:2)}
-# Redefining the model, in order not to confuse the knitr cache which leads to segfaults
-suppressMessages(SFO_SFO <- mkinmod(
- parent = list(type = "SFO", to = "m1", sink = TRUE),
- m1 = list(type = "SFO")))
library("microbenchmark")
mb.1 <- microbenchmark(
- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "deSolve", use_compiled = FALSE,
- quiet = TRUE),
- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen", quiet = TRUE),
mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "deSolve", quiet = TRUE),
+ mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen", quiet = TRUE),
+ mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "odeintr", quiet = TRUE),
times = 3, control = list(warmup = 1))
smb.1 <- summary(mb.1)[-1]
-rownames(smb.1) <- c("deSolve, not compiled", "Eigenvalue based", "deSolve, compiled")
+rownames(smb.1) <- c("deSolve, not compiled", "Eigenvalue based", "odeintr, compiled")
print(smb.1)
```
-We see that using the compiled model is almost a factor of 8 faster than using the R version
+We see that using the compiled model is more than 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:
```{r}
-smb.1["median"]/smb.1["deSolve, compiled", "median"]
+smb.1["median"]/smb.1["odeintr, compiled", "median"]
```
# Benchmark for a model that can not be solved with Eigenvalues
@@ -73,15 +66,15 @@ FOMC_SFO <- mkinmod( m1 = list(type = "SFO"))
mb.2 <- microbenchmark(
- mkinfit(FOMC_SFO, FOCUS_2006_D, use_compiled = FALSE, quiet = TRUE),
- mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE),
+ mkinfit(FOMC_SFO, FOCUS_2006_D, solution_type = "deSolve", quiet = TRUE),
+ mkinfit(FOMC_SFO, FOCUS_2006_D, solution_type = "odeintr", quiet = TRUE),
times = 3, control = list(warmup = 1))
smb.2 <- summary(mb.2)[-1]
-rownames(smb.2) <- c("deSolve, not compiled", "deSolve, compiled")
+rownames(smb.2) <- c("deSolve, not compiled", "odeintr, compiled")
print(smb.2)
-smb.2["median"]/smb.2["deSolve, compiled", "median"]
+smb.2["median"]/smb.2["odeintr, compiled", "median"]
```
Here we get a performance benefit of more than a factor of 8 using the version
-of the differential equation model compiled from C code using the ccSolve package!
+of the differential equation model compiled from C++ code using the odeintr package!
diff --git a/vignettes/compiled_models.html b/vignettes/compiled_models.html index 2f2a6edb..efdbe20d 100644 --- a/vignettes/compiled_models.html +++ b/vignettes/compiled_models.html @@ -77,37 +77,30 @@ img { --> <div id="benchmark-for-a-model-that-can-also-be-solved-with-eigenvalues" class="section level1"> <h1>Benchmark for a model that can also be solved with Eigenvalues</h1> -<p>This evaluation is taken from the example section of mkinfit. When using an mkin version greater than 0.9-36 and the ccSolve package is installed and functional, you will get a message that the model is being compiled when defining a model using mkinmod.</p> +<p>This evaluation is taken from the example section of mkinfit. When using an mkin version greater or equal than 0.9-36 and the C++ compiler g++ is installed and functional (on Windows, install Rtools), you will get a message that the model is being compiled when defining a model using mkinmod.</p> <pre class="r"><code>library("mkin") SFO_SFO <- mkinmod( parent = list(type = "SFO", to = "m1", sink = TRUE), - m1 = list(type = "SFO"))</code></pre> -<pre><code>## Compiling differential equation model from auto-generated C code...</code></pre> + m1 = list(type = "SFO"), odeintr_compile = "yes")</code></pre> +<pre><code>## Compiling differential equation model from auto-generated C++ code...</code></pre> <p>We can compare the performance of the Eigenvalue based solution against the compiled version and the R implementation of the differential equations using the microbenchmark package.</p> -<pre class="r"><code>library("microbenchmark") -mb.1 <- microbenchmark( - mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "deSolve", use_compiled = FALSE, - quiet = TRUE), - mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen", quiet = TRUE), - mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "deSolve", quiet = TRUE), - times = 3, control = list(warmup = 1)) -smb.1 <- summary(mb.1)[-1] -rownames(smb.1) <- c("deSolve, not compiled", "Eigenvalue based", "deSolve, compiled") +<pre class="r"><code>smb.1 <- summary(mb.1)[-1] +rownames(smb.1) <- c("deSolve, not compiled", "Eigenvalue based", "odeintr, compiled") print(smb.1)</code></pre> <pre><code>## min lq mean median uq -## deSolve, not compiled 6192.0125 6195.3470 6211.0309 6198.6816 6220.5401 -## Eigenvalue based 956.7604 1008.7224 1026.2572 1060.6844 1061.0055 -## deSolve, compiled 869.6880 871.9315 883.4929 874.1751 890.3953 +## deSolve, not compiled 5254.1030 5261.3501 5277.1074 5268.5973 5288.6096 +## Eigenvalue based 897.1575 921.6935 930.9546 946.2296 947.8531 +## odeintr, compiled 693.6001 709.0719 719.5530 724.5438 732.5295 ## max neval -## deSolve, not compiled 6242.3986 3 -## Eigenvalue based 1061.3266 3 -## deSolve, compiled 906.6155 3</code></pre> -<p>We see that using the compiled model is almost a factor of 8 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> -<pre class="r"><code>smb.1["median"]/smb.1["deSolve, compiled", "median"]</code></pre> +## deSolve, not compiled 5308.6218 3 +## Eigenvalue based 949.4766 3 +## odeintr, compiled 740.5151 3</code></pre> +<p>We see that using the compiled model is more than 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> +<pre class="r"><code>smb.1["median"]/smb.1["odeintr, compiled", "median"]</code></pre> <pre><code>## median -## deSolve, not compiled 7.120877 -## Eigenvalue based 1.205328 -## deSolve, compiled 1.000000</code></pre> +## deSolve, not compiled 7.290796 +## Eigenvalue based 1.370242 +## odeintr, compiled 1.000000</code></pre> </div> <div id="benchmark-for-a-model-that-can-not-be-solved-with-eigenvalues" class="section level1"> <h1>Benchmark for a model that can not be solved with Eigenvalues</h1> @@ -115,25 +108,25 @@ print(smb.1)</code></pre> <pre class="r"><code>FOMC_SFO <- mkinmod( parent = list(type = "FOMC", to = "m1", sink = TRUE), m1 = list(type = "SFO"))</code></pre> -<pre><code>## Compiling differential equation model from auto-generated C code...</code></pre> +<pre><code>## Compiling differential equation model from auto-generated C++ code...</code></pre> <pre class="r"><code>mb.2 <- microbenchmark( - mkinfit(FOMC_SFO, FOCUS_2006_D, use_compiled = FALSE, quiet = TRUE), - mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE), + mkinfit(FOMC_SFO, FOCUS_2006_D, solution_type = "deSolve", quiet = TRUE), + mkinfit(FOMC_SFO, FOCUS_2006_D, solution_type = "odeintr", quiet = TRUE), times = 3, control = list(warmup = 1)) smb.2 <- summary(mb.2)[-1] -rownames(smb.2) <- c("deSolve, not compiled", "deSolve, compiled") +rownames(smb.2) <- c("deSolve, not compiled", "odeintr, compiled") print(smb.2)</code></pre> <pre><code>## min lq mean median uq -## deSolve, not compiled 13.297283 13.427702 13.481155 13.558121 13.573092 -## deSolve, compiled 1.486926 1.526887 1.546851 1.566848 1.576813 +## deSolve, not compiled 11.243675 11.324875 11.382415 11.406074 11.451785 +## odeintr, compiled 1.207114 1.209908 1.239989 1.212703 1.256426 ## max neval -## deSolve, not compiled 13.588063 3 -## deSolve, compiled 1.586778 3</code></pre> -<pre class="r"><code>smb.2["median"]/smb.2["deSolve, compiled", "median"]</code></pre> +## deSolve, not compiled 11.497496 3 +## odeintr, compiled 1.300149 3</code></pre> +<pre class="r"><code>smb.2["median"]/smb.2["odeintr, compiled", "median"]</code></pre> <pre><code>## median -## deSolve, not compiled 8.653119 -## deSolve, compiled 1.000000</code></pre> -<p>Here we get a performance benefit of more than a factor of 8 using the version of the differential equation model compiled from C code using the ccSolve package!</p> +## deSolve, not compiled 9.405494 +## odeintr, compiled 1.000000</code></pre> +<p>Here we get a performance benefit of more than a factor of 8 using the version of the differential equation model compiled from C++ code using the odeintr package!</p> </div> |