From cff25a78e0e5a9d46db575b1ae3b02ace560aaf6 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 22 Jul 2022 11:43:49 +0200 Subject: Update static docs --- docs/articles/web_only/benchmarks.html | 79 ++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 22 deletions(-) (limited to 'docs/articles/web_only/benchmarks.html') diff --git a/docs/articles/web_only/benchmarks.html b/docs/articles/web_only/benchmarks.html index 4e0cbba7..0b14fea2 100644 --- a/docs/articles/web_only/benchmarks.html +++ b/docs/articles/web_only/benchmarks.html @@ -33,7 +33,7 @@ mkin - 1.1.1 + 1.1.2 @@ -105,7 +105,7 @@

Benchmark timings for mkin

Johannes Ranke

-

Last change 1 July 2022 (rebuilt 2022-07-12)

+

Last change 14 July 2022 (rebuilt 2022-07-22)

Source: vignettes/web_only/benchmarks.rmd @@ -116,20 +116,32 @@

Each system is characterized by the operating system type, the CPU type, the mkin version, and, as in June 2022 the current R version lead to worse performance, the R version. A compiler was available, so if no analytical solution was available, compiled ODE models are used.

Every fit is only performed once, so the accuracy of the benchmarks is limited.

+

The following wrapper function for mmkin is used because the way the error model is specified was changed in mkin version 0.9.49.1.

+
+if (packageVersion("mkin") > "0.9.48.1") {
+  mmkin_bench <- function(models, datasets, error_model = "const") {
+    mmkin(models, datasets, error_model = error_model, cores = 1, quiet = TRUE)
+  }
+} else {
+  mmkin_bench <- function(models, datasets, error_model = NULL) {
+    mmkin(models, datasets, reweight.method = error_model, cores = 1, quiet = TRUE)
+  }
+}

Test cases

Parent only:

-
+
 FOCUS_C <- FOCUS_2006_C
 FOCUS_D <- subset(FOCUS_2006_D, value != 0)
 parent_datasets <- list(FOCUS_C, FOCUS_D)
 
+
 t1 <- system.time(mmkin_bench(c("SFO", "FOMC", "DFOP", "HS"), parent_datasets))[["elapsed"]]
 t2 <- system.time(mmkin_bench(c("SFO", "FOMC", "DFOP", "HS"), parent_datasets,
     error_model = "tc"))[["elapsed"]]

One metabolite:

-
+
 SFO_SFO <- mkinmod(
   parent = mkinsub("SFO", "m1"),
   m1 = mkinsub("SFO"))
@@ -145,7 +157,7 @@
 t5 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
     error_model = "obs"))[["elapsed"]]

Two metabolites, synthetic data:

-
+
 m_synth_SFO_lin <- mkinmod(parent = mkinsub("SFO", "M1"),
                            M1 = mkinsub("SFO", "M2"),
                            M2 = mkinsub("SFO"),
@@ -172,12 +184,6 @@
     error_model = "obs"))[["elapsed"]]
 t11 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
     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 = benchmark_path)
-# Hide rownames from kable for results section
-rownames(mkin_benchmarks) <- NULL

Results @@ -322,8 +328,16 @@ Ryzen 7 1700 4.2.1 1.1.1 -1.809 -3.468 +1.770 +3.377 + + +Linux +Ryzen 7 1700 +4.2.1 +1.1.2 +1.962 +3.606 @@ -483,9 +497,18 @@ Ryzen 7 1700 4.2.1 1.1.1 -1.336 -5.820 -2.621 +1.308 +5.758 +2.558 + + +Linux +Ryzen 7 1700 +4.2.1 +1.1.2 +1.465 +6.184 +2.752 @@ -693,12 +716,24 @@ Ryzen 7 1700 4.2.1 1.1.1 -0.707 -1.148 -1.339 -2.812 -1.752 -2.594 +0.696 +1.124 +1.321 +2.786 +1.744 +2.566 + + +Linux +Ryzen 7 1700 +4.2.1 +1.1.2 +0.857 +1.298 +1.504 +3.011 +1.888 +2.756 -- cgit v1.2.1