From 4eada5fff40493fad77726531e22dd6ad693a662 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 12 May 2020 17:48:07 +0200 Subject: Improve formatting of benchmark vignette --- vignettes/web_only/benchmarks.Rmd | 23 ++-- vignettes/web_only/benchmarks.html | 198 ++++++++++++++++++++++++++++----- vignettes/web_only/mkin_benchmarks.rda | Bin 885 -> 852 bytes 3 files changed, 182 insertions(+), 39 deletions(-) diff --git a/vignettes/web_only/benchmarks.Rmd b/vignettes/web_only/benchmarks.Rmd index 27f5d366..990c2fee 100644 --- a/vignettes/web_only/benchmarks.Rmd +++ b/vignettes/web_only/benchmarks.Rmd @@ -92,18 +92,18 @@ SFO_lin_a <- synthetic_data_for_UBA_2014[[1]]$data DFOP_par_c <- synthetic_data_for_UBA_2014[[12]]$data -t6 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a)))["elapsed"] -t7 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c)))["elapsed"] +t6 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a)))[["elapsed"]] +t7 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c)))[["elapsed"]] t8 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a), - error_model = "tc"))["elapsed"] + error_model = "tc"))[["elapsed"]] t9 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c), - error_model = "tc"))["elapsed"] + error_model = "tc"))[["elapsed"]] t10 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a), - error_model = "obs"))["elapsed"] + error_model = "obs"))[["elapsed"]] t11 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c), - error_model = "obs"))["elapsed"] + error_model = "obs"))[["elapsed"]] ``` ```{r results} @@ -117,6 +117,11 @@ save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks.rda" Currently, we only have benchmark information on one system, therefore only the mkin version is shown with the results below. Timings are in seconds, shorter is better. +```{r} +rownames(mkin_benchmarks) <- as.character(mkin_benchmarks$mkin) +``` + + Benchmarks for all available error models are shown. ### Parent only @@ -124,7 +129,7 @@ Benchmarks for all available error models are shown. Constant variance and two-component error model: ```{r} -print(mkin_benchmarks[, c("mkin", "t1", "t2")], row.names = FALSE) +kable(mkin_benchmarks[, c("t1", "t2")]) ``` ### One metabolite @@ -132,7 +137,7 @@ print(mkin_benchmarks[, c("mkin", "t1", "t2")], row.names = FALSE) Constant variance, variance by variable and two-component error model: ```{r} -print(mkin_benchmarks[, c("mkin", "t3", "t4", "t5")], row.names = FALSE) +kable(mkin_benchmarks[, c("t3", "t4", "t5")]) ``` ### Two metabolites @@ -141,5 +146,5 @@ Two different datasets, for each constant variance, variance by variable and two-component error model are shown: ```{r} -print(mkin_benchmarks[, c("mkin", paste0("t", 6:11))], row.names = FALSE) +kable(mkin_benchmarks[, paste0("t", 6:11)]) ``` diff --git a/vignettes/web_only/benchmarks.html b/vignettes/web_only/benchmarks.html index 5c9cc67e..821399e4 100644 --- a/vignettes/web_only/benchmarks.html +++ b/vignettes/web_only/benchmarks.html @@ -1649,18 +1649,18 @@ SFO_lin_a <- synthetic_data_for_UBA_2014[[1]]$data DFOP_par_c <- synthetic_data_for_UBA_2014[[12]]$data -t6 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a)))["elapsed"] -t7 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c)))["elapsed"] +t6 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a)))[["elapsed"]] +t7 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c)))[["elapsed"]] t8 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a), - error_model = "tc"))["elapsed"] + error_model = "tc"))[["elapsed"]] t9 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c), - error_model = "tc"))["elapsed"] + error_model = "tc"))[["elapsed"]] t10 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a), - error_model = "obs"))["elapsed"] + error_model = "obs"))[["elapsed"]] t11 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c), - error_model = "obs"))["elapsed"] + error_model = "obs"))[["elapsed"]]
mkin_benchmarks[system_string, paste0("t", 1:11)] <-
   c(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11)
 save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks.rda")
@@ -1668,42 +1668,180 @@ save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks

Results

Currently, we only have benchmark information on one system, therefore only the mkin version is shown with the results below. Timings are in seconds, shorter is better.

+
rownames(mkin_benchmarks) <- as.character(mkin_benchmarks$mkin)

Benchmarks for all available error models are shown.

Parent only

Constant variance and two-component error model:

-
print(mkin_benchmarks[, c("mkin", "t1", "t2")], row.names = FALSE)
-
##      mkin    t1     t2
-##  0.9.48.1 3.610 11.019
-##  0.9.49.1 8.184 22.889
-##  0.9.49.2 7.064 12.558
-##  0.9.49.3 7.296 21.239
-##  0.9.49.4 5.936 20.545
-##  0.9.50.2 1.547  3.955
+
kable(mkin_benchmarks[, c("t1", "t2")])
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
t1t2
0.9.48.13.61011.019
0.9.49.18.18422.889
0.9.49.27.06412.558
0.9.49.37.29621.239
0.9.49.45.93620.545
0.9.50.21.5593.929

One metabolite

Constant variance, variance by variable and two-component error model:

-
print(mkin_benchmarks[, c("mkin", "t3", "t4", "t5")], row.names = FALSE)
-
##      mkin    t3     t4    t5
-##  0.9.48.1 3.764 14.347 9.495
-##  0.9.49.1 4.649 13.789 6.395
-##  0.9.49.2 4.786  8.461 5.675
-##  0.9.49.3 4.510 13.805 7.386
-##  0.9.49.4 4.446 15.335 6.002
-##  0.9.50.2 1.379  6.176 2.713
+
kable(mkin_benchmarks[, c("t3", "t4", "t5")])
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
t3t4t5
0.9.48.13.76414.3479.495
0.9.49.14.64913.7896.395
0.9.49.24.7868.4615.675
0.9.49.34.51013.8057.386
0.9.49.44.44615.3356.002
0.9.50.21.3526.1102.841

Two metabolites

Two different datasets, for each constant variance, variance by variable and two-component error model are shown:

-
print(mkin_benchmarks[, c("mkin", paste0("t", 6:11))], row.names = FALSE)
-
##      mkin    t6    t7    t8     t9   t10    t11
-##  0.9.48.1 2.623 4.587 7.525 16.621 8.576 31.267
-##  0.9.49.1 2.542 4.128 4.632  8.171 3.676  5.636
-##  0.9.49.2 2.723 4.478 4.862  7.618 3.579  5.574
-##  0.9.49.3 2.643 4.374  7.02 11.124 5.388  7.365
-##  0.9.49.4 2.635 4.259 4.737  7.763 3.427  5.626
-##  0.9.50.2 0.742 1.202 1.269   2.97 2.028  2.959
+
kable(mkin_benchmarks[, paste0("t", 6:11)])
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
t6t7t8t9t10t11
0.9.48.12.6234.5877.52516.6218.57631.267
0.9.49.12.5424.1284.6328.1713.6765.636
0.9.49.22.7234.4784.8627.6183.5795.574
0.9.49.32.6434.3747.02011.1245.3887.365
0.9.49.42.6354.2594.7377.7633.4275.626
0.9.50.20.7591.2041.2752.8372.0262.976
diff --git a/vignettes/web_only/mkin_benchmarks.rda b/vignettes/web_only/mkin_benchmarks.rda index 870ecc2b..8e3f0b3b 100644 Binary files a/vignettes/web_only/mkin_benchmarks.rda and b/vignettes/web_only/mkin_benchmarks.rda differ -- cgit v1.2.1