From 2bb59c88d49b193f278916ad9cc4de83c0de9604 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 2 Mar 2022 18:03:54 +0100 Subject: Make tests more platform independent, update docs --- docs/articles/web_only/benchmarks.html | 109 +++++++++++++++++++++------------ 1 file changed, 69 insertions(+), 40 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 290906c1..2eea3cb2 100644 --- a/docs/articles/web_only/benchmarks.html +++ b/docs/articles/web_only/benchmarks.html @@ -19,6 +19,8 @@ + +
+
@@ -110,17 +115,17 @@

Each system is characterized by its CPU type, the operating system type and the mkin version. Currently only values for one system are available. A compiler was available, so if no analytical solution was available, compiled ODE models are used.

-
-

-Test cases

+
+

Test cases +

Parent only:

 FOCUS_C <- FOCUS_2006_C
-FOCUS_D <- subset(FOCUS_2006_D, value != 0)
-parent_datasets <- list(FOCUS_C, FOCUS_D)
+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,
+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:

@@ -133,10 +138,10 @@
 DFOP_SFO <- mkinmod(
   parent = mkinsub("FOMC", "m1"),
   m1 = mkinsub("SFO"))
-t3 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D)))[["elapsed"]]
-t4 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
+t3 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D)))[["elapsed"]]
+t4 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
     error_model = "tc"))[["elapsed"]]
-t5 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
+t5 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
     error_model = "obs"))[["elapsed"]]

Two metabolites, synthetic data:

@@ -145,7 +150,7 @@
                            M2 = mkinsub("SFO"),
                            use_of_ff = "max", quiet = TRUE)
 
-m_synth_DFOP_par <- mkinmod(parent = mkinsub("DFOP", c("M1", "M2")),
+m_synth_DFOP_par <- mkinmod(parent = mkinsub("DFOP", c("M1", "M2")),
                            M1 = mkinsub("SFO"),
                            M2 = mkinsub("SFO"),
                            use_of_ff = "max", quiet = TRUE)
@@ -154,31 +159,31 @@
 
 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),
+t8 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a),
     error_model = "tc"))[["elapsed"]]
-t9 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
+t9 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
     error_model = "tc"))[["elapsed"]]
 
-t10 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a),
+t10 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a),
     error_model = "obs"))[["elapsed"]]
-t11 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
+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 = "~/git/mkin/vignettes/web_only/mkin_benchmarks.rda")
+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")
-
-

-Results

+
+

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. All results were obtained by serial, i.e. not using multiple computing cores.

Benchmarks for all available error models are shown.

-
-

-Parent only

+
+

Parent only +

Constant variance (t1) and two-component error model (t2) for four models fitted to two datasets, i.e. eight fits for each test.

@@ -237,12 +242,17 @@ + + + + +
1.867 3.450
1.1.01.9383.517
-
-

-One metabolite

+
+

One metabolite +

Constant variance (t3), two-component error model (t4), and variance by variable (t5) for three models fitted to one dataset, i.e. three fits for each test.

@@ -312,12 +322,18 @@ + + + + + +
6.364 2.820
1.1.01.4706.5082.894
-
-

-Two metabolites

+
+

Two metabolites +

Constant variance (t6 and t7), two-component error model (t8 and t9), and variance by variable (t10 and t11) for one model fitted to one dataset, i.e. one fit for each test.

@@ -420,6 +436,15 @@ + + + + + + + + +
1.936 2.826
1.1.00.8101.2641.5033.0961.9842.847
@@ -437,11 +462,13 @@ @@ -450,5 +477,7 @@ + + -- cgit v1.2.1