From c6759635fbea7f541d421b3de78f0d8868856486 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 23 Jun 2015 11:44:00 +0200 Subject: Vignettes rebuilt by staticdocs::build_site() for static documentation on r-forge --- Rplots.pdf | Bin 0 -> 4805 bytes vignettes/FOCUS_D.html | 14 +++++----- vignettes/FOCUS_L.html | 60 ++++++++++++++++++++--------------------- vignettes/FOCUS_Z.pdf | Bin 224278 -> 225020 bytes vignettes/compiled_models.html | 42 ++++++++++++++--------------- vignettes/mkin.pdf | Bin 160260 -> 160260 bytes 6 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 Rplots.pdf diff --git a/Rplots.pdf b/Rplots.pdf new file mode 100644 index 00000000..38604cf9 Binary files /dev/null and b/Rplots.pdf differ diff --git a/vignettes/FOCUS_D.html b/vignettes/FOCUS_D.html index 45c5810a..099004ad 100644 --- a/vignettes/FOCUS_D.html +++ b/vignettes/FOCUS_D.html @@ -10,7 +10,7 @@ - + Example evaluation of FOCUS Example Dataset D @@ -64,7 +64,7 @@ img { @@ -117,9 +117,9 @@ print(FOCUS_2006_D) ## 43 m1 120 25.15 ## 44 m1 120 33.31

Next we specify the degradation model: The parent compound degrades with simple first-order 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 gcc compiler is installed and functional, the differential equation model will be compiled from auto-generated C code.

+

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 a C compiler (gcc) is installed and functional, the differential equation model will be compiled from auto-generated C code.

SFO_SFO <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"))
-
## Compiling differential equation model from auto-generated C code...
+
## Successfully compiled differential equation model from auto-generated C code.
print(SFO_SFO$diffs)
##                                                       parent 
 ## "d_parent = - k_parent_sink * parent - k_parent_m1 * parent" 
@@ -137,8 +137,8 @@ print(FOCUS_2006_D)
summary(fit)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:24 2015 
-## Date of summary: Mon Jun 22 23:02:25 2015 
+## Date of fit:     Tue Jun 23 11:42:55 2015 
+## Date of summary: Tue Jun 23 11:42:55 2015 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent - k_parent_m1 * parent
@@ -146,7 +146,7 @@ print(FOCUS_2006_D)
## ## Model predictions using solution type deSolve ## -## Fitted with method Port using 153 model solutions performed in 0.772 s +## Fitted with method Port using 153 model solutions performed in 0.719 s ## ## Weighting: none ## diff --git a/vignettes/FOCUS_L.html b/vignettes/FOCUS_L.html index 7ea5d342..ec4203b7 100644 --- a/vignettes/FOCUS_L.html +++ b/vignettes/FOCUS_L.html @@ -10,7 +10,7 @@ - + Example evaluation of FOCUS Laboratory Data L1 to L3 @@ -65,7 +65,7 @@ img {
@@ -93,15 +93,15 @@ FOCUS_2006_L1_mkin <- mkin_wide_to_long(FOCUS_2006_L1) summary(m.L1.SFO)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:25 2015 
-## Date of summary: Mon Jun 22 23:02:25 2015 
+## Date of fit:     Tue Jun 23 11:42:56 2015 
+## Date of summary: Tue Jun 23 11:42:56 2015 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 37 model solutions performed in 0.097 s
+## Fitted with method Port using 37 model solutions performed in 0.096 s
 ## 
 ## Weighting: none
 ## 
@@ -183,8 +183,8 @@ summary(m.L1.SFO)
summary(m.L1.FOMC, data = FALSE)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:26 2015 
-## Date of summary: Mon Jun 22 23:02:26 2015 
+## Date of fit:     Tue Jun 23 11:42:57 2015 
+## Date of summary: Tue Jun 23 11:42:57 2015 
 ## 
 ## 
 ## Warning: Optimisation by method Port did not converge.
@@ -196,7 +196,7 @@ summary(m.L1.SFO)
## ## Model predictions using solution type analytical ## -## Fitted with method Port using 188 model solutions performed in 0.492 s +## Fitted with method Port using 188 model solutions performed in 0.466 s ## ## Weighting: none ## @@ -263,15 +263,15 @@ FOCUS_2006_L2_mkin <- mkin_wide_to_long(FOCUS_2006_L2) summary(m.L2.SFO)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:26 2015 
-## Date of summary: Mon Jun 22 23:02:26 2015 
+## Date of fit:     Tue Jun 23 11:42:57 2015 
+## Date of summary: Tue Jun 23 11:42:57 2015 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 41 model solutions performed in 0.111 s
+## Fitted with method Port using 41 model solutions performed in 0.108 s
 ## 
 ## Weighting: none
 ## 
@@ -351,15 +351,15 @@ mkinresplot(m.L2.FOMC)
summary(m.L2.FOMC, data = FALSE)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:27 2015 
-## Date of summary: Mon Jun 22 23:02:27 2015 
+## Date of fit:     Tue Jun 23 11:42:57 2015 
+## Date of summary: Tue Jun 23 11:42:57 2015 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 81 model solutions performed in 0.217 s
+## Fitted with method Port using 81 model solutions performed in 0.214 s
 ## 
 ## Weighting: none
 ## 
@@ -423,8 +423,8 @@ plot(m.L2.DFOP)
summary(m.L2.DFOP, data = FALSE)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:29 2015 
-## Date of summary: Mon Jun 22 23:02:29 2015 
+## Date of fit:     Tue Jun 23 11:43:00 2015 
+## Date of summary: Tue Jun 23 11:43:00 2015 
 ## 
 ## Equations:
 ## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -433,7 +433,7 @@ plot(m.L2.DFOP)
## ## Model predictions using solution type analytical ## -## Fitted with method Port using 336 model solutions performed in 0.967 s +## Fitted with method Port using 336 model solutions performed in 0.917 s ## ## Weighting: none ## @@ -500,8 +500,8 @@ plot(m.L3.SFO)
summary(m.L3.SFO)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:29 2015 
-## Date of summary: Mon Jun 22 23:02:29 2015 
+## Date of fit:     Tue Jun 23 11:43:00 2015 
+## Date of summary: Tue Jun 23 11:43:00 2015 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
@@ -576,15 +576,15 @@ plot(m.L3.FOMC)
summary(m.L3.FOMC, data = FALSE)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:30 2015 
-## Date of summary: Mon Jun 22 23:02:30 2015 
+## Date of fit:     Tue Jun 23 11:43:00 2015 
+## Date of summary: Tue Jun 23 11:43:00 2015 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 83 model solutions performed in 0.243 s
+## Fitted with method Port using 83 model solutions performed in 0.207 s
 ## 
 ## Weighting: none
 ## 
@@ -642,8 +642,8 @@ plot(m.L3.DFOP)
summary(m.L3.DFOP, data = FALSE)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:30 2015 
-## Date of summary: Mon Jun 22 23:02:30 2015 
+## Date of fit:     Tue Jun 23 11:43:01 2015 
+## Date of summary: Tue Jun 23 11:43:01 2015 
 ## 
 ## Equations:
 ## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -724,15 +724,15 @@ plot(m.L4.SFO)
summary(m.L4.SFO, data = FALSE)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:31 2015 
-## Date of summary: Mon Jun 22 23:02:31 2015 
+## Date of fit:     Tue Jun 23 11:43:01 2015 
+## Date of summary: Tue Jun 23 11:43:01 2015 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 46 model solutions performed in 0.151 s
+## Fitted with method Port using 46 model solutions performed in 0.114 s
 ## 
 ## Weighting: none
 ## 
@@ -789,15 +789,15 @@ plot(m.L4.FOMC)
summary(m.L4.FOMC, data = FALSE)
## mkin version:    0.9.37 
 ## R version:       3.2.1 
-## Date of fit:     Mon Jun 22 23:02:31 2015 
-## Date of summary: Mon Jun 22 23:02:31 2015 
+## Date of fit:     Tue Jun 23 11:43:02 2015 
+## Date of summary: Tue Jun 23 11:43:02 2015 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 66 model solutions performed in 0.186 s
+## Fitted with method Port using 66 model solutions performed in 0.166 s
 ## 
 ## Weighting: none
 ## 
diff --git a/vignettes/FOCUS_Z.pdf b/vignettes/FOCUS_Z.pdf
index 98cf0c4d..1ac6002b 100644
Binary files a/vignettes/FOCUS_Z.pdf and b/vignettes/FOCUS_Z.pdf differ
diff --git a/vignettes/compiled_models.html b/vignettes/compiled_models.html
index 8fb08136..814f3a52 100644
--- a/vignettes/compiled_models.html
+++ b/vignettes/compiled_models.html
@@ -10,7 +10,7 @@
 
 
 
-
+
 
 Performance benefit by using compiled model definitions in mkin
 
@@ -65,7 +65,7 @@ img {
 
 
 
@@ -77,7 +77,7 @@ img {

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 equal to or greater than 0.9-36 and a compiler (gcc) is installed, you will see a message that the model is being compiled from autogenerated C code when defining a model using mkinmod. The package tests for presence of the gcc compiler using

+

This evaluation is taken from the example section of mkinfit. When using an mkin version equal to or greater than 0.9-36 and a C compiler (gcc) is available, you will see a message that the model is being compiled from autogenerated C code when defining a model using mkinmod. The mkinmod() function checks for presence of the gcc compiler using

Sys.which("gcc")
##            gcc 
 ## "/usr/bin/gcc"
@@ -86,7 +86,7 @@ img { SFO_SFO <- mkinmod( parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"))
-
## Compiling differential equation model from auto-generated C code...
+
## Successfully compiled differential equation model from auto-generated C code.

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.

library("microbenchmark")
 mb.1 <- microbenchmark(
@@ -99,18 +99,18 @@ smb.1 <- summary(mb.1)[-1]
 rownames(smb.1) <- c("deSolve, not compiled", "Eigenvalue based", "deSolve, compiled")
 print(smb.1)
##                             min        lq      mean    median        uq
-## deSolve, not compiled 6896.8680 6933.3330 6963.5277 6969.7979 6996.8575
-## Eigenvalue based       933.0581  937.8984  963.5002  942.7388  978.7213
-## deSolve, compiled      784.9729  807.9919  822.4500  831.0110  841.1886
+## deSolve, not compiled 6650.2684 6684.4530 6774.1607 6718.6377 6836.1068
+## Eigenvalue based       903.5520  916.8598  927.3873  930.1676  939.3049
+## deSolve, compiled      751.1205  752.5239  756.1227  753.9273  758.6238
 ##                             max neval
-## deSolve, not compiled 7023.9171     3
-## Eigenvalue based      1014.7039     3
-## deSolve, compiled      851.3663     3
-

We see that using the compiled model is by a factor of 8.4 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:

+## deSolve, not compiled 6953.5760 3 +## Eigenvalue based 948.4423 3 +## deSolve, compiled 763.3202 3 +

We see that using the compiled model is by a factor of 8.9 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:

smb.1["median"]/smb.1["deSolve, compiled", "median"]
##                         median
-## deSolve, not compiled 8.387131
-## Eigenvalue based      1.134448
+## deSolve, not compiled 8.911519
+## Eigenvalue based      1.233763
 ## deSolve, compiled     1.000000
@@ -119,7 +119,7 @@ print(smb.1)
FOMC_SFO <- mkinmod(
   parent = mkinsub("FOMC", "m1"),
   m1 = mkinsub( "SFO"))
-
## Compiling differential equation model from auto-generated C code...
+
## Successfully compiled differential equation model from auto-generated C code.
mb.2 <- microbenchmark(
   mkinfit(FOMC_SFO, FOCUS_2006_D, use_compiled = FALSE, quiet = TRUE),
   mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE),
@@ -127,17 +127,17 @@ print(smb.1)
smb.2 <- summary(mb.2)[-1] rownames(smb.2) <- c("deSolve, not compiled", "deSolve, compiled") print(smb.2) -
##                             min        lq      mean    median        uq
-## deSolve, not compiled 14.661881 14.668453 14.701870 14.675025 14.721864
-## deSolve, compiled      1.393051  1.394908  1.415653  1.396764  1.426953
+
##                            min        lq      mean    median        uq
+## deSolve, not compiled 14.32061 14.336413 14.380847 14.352216 14.410966
+## deSolve, compiled      1.34366  1.344778  1.371116  1.345897  1.384844
 ##                             max neval
-## deSolve, not compiled 14.768704     3
-## deSolve, compiled      1.457143     3
+## deSolve, not compiled 14.469716 3 +## deSolve, compiled 1.423791 3
smb.2["median"]/smb.2["deSolve, compiled", "median"]
##                         median
-## deSolve, not compiled 10.50644
+## deSolve, not compiled 10.66368
 ## deSolve, compiled      1.00000
-

Here we get a performance benefit of a factor of 10.5 using the version of the differential equation model compiled from C code using the inline package!

+

Here we get a performance benefit of a factor of 10.7 using the version of the differential equation model compiled from C code using the inline package!

This vignette was built with mkin 0.9.37 on

## R version 3.2.1 (2015-06-18)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
diff --git a/vignettes/mkin.pdf b/vignettes/mkin.pdf
index f7795162..7534bc6d 100644
Binary files a/vignettes/mkin.pdf and b/vignettes/mkin.pdf differ
-- 
cgit v1.2.1