From 7008a4ee100830a29a923a05274fd4ca216cd1ea Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 1 Jul 2022 09:08:49 +0200 Subject: Add R version to data in benchmark vignette --- docs/articles/web_only/benchmarks.html | 408 +++++++++++++++++++++++---------- 1 file changed, 283 insertions(+), 125 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 058d43fa..309cc746 100644 --- a/docs/articles/web_only/benchmarks.html +++ b/docs/articles/web_only/benchmarks.html @@ -105,7 +105,7 @@

Benchmark timings for mkin

Johannes Ranke

-

Last change 13 May 2020 (rebuilt 2022-05-18)

+

Last change 30 June 2022 (rebuilt 2022-07-01)

Source: vignettes/web_only/benchmarks.rmd @@ -114,148 +114,201 @@ -

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.

+

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.

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"]]
+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"))
-FOMC_SFO <- mkinmod(
-  parent = mkinsub("FOMC", "m1"),
-  m1 = mkinsub("SFO"))
-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),
-    error_model = "tc"))[["elapsed"]]
-t5 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
-    error_model = "obs"))[["elapsed"]]
+SFO_SFO <- mkinmod( + parent = mkinsub("SFO", "m1"), + m1 = mkinsub("SFO")) +FOMC_SFO <- mkinmod( + parent = mkinsub("FOMC", "m1"), + m1 = mkinsub("SFO")) +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), + error_model = "tc"))[["elapsed"]] +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"),
-                           use_of_ff = "max", quiet = TRUE)
-
-m_synth_DFOP_par <- mkinmod(parent = mkinsub("DFOP", c("M1", "M2")),
-                           M1 = mkinsub("SFO"),
-                           M2 = mkinsub("SFO"),
-                           use_of_ff = "max", quiet = TRUE)
-
-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"]]
-
-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),
-    error_model = "tc"))[["elapsed"]]
-
-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),
-    error_model = "obs"))[["elapsed"]]
+m_synth_SFO_lin <- mkinmod(parent = mkinsub("SFO", "M1"), + M1 = mkinsub("SFO", "M2"), + M2 = mkinsub("SFO"), + use_of_ff = "max", quiet = TRUE) + +m_synth_DFOP_par <- mkinmod(parent = mkinsub("DFOP", c("M1", "M2")), + M1 = mkinsub("SFO"), + M2 = mkinsub("SFO"), + use_of_ff = "max", quiet = TRUE) + +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"]] + +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), + error_model = "tc"))[["elapsed"]] + +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), + 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 = benchmark_path) +# Hide rownames from kable for results section +rownames(mkin_benchmarks) <- NULL

Results

-

Benchmarks for all available error models are shown.

+

Benchmarks for all available error models are shown. They are intended for improving mkin, not for comparing CPUs or operating systems. All trademarks belong to their respective owners.

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.

- ----- +
- + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - - - + + + + + + - + + + + + + + + + + + + + + + + + + + +
OSCPURmkin t1 t2
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1LinuxRyzen 7 1700NA0.9.48.1 3.610 11.019
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1LinuxRyzen 7 1700NA0.9.49.1 8.184 22.889
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2LinuxRyzen 7 1700NA0.9.49.2 7.064 12.558
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3LinuxRyzen 7 1700NA0.9.49.3 7.296 21.239
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4LinuxRyzen 7 1700NA0.9.49.4 5.936 20.545
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2LinuxRyzen 7 1700NA0.9.50.2 1.714 3.971
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.3LinuxRyzen 7 1700NA0.9.50.3 1.752 4.156
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.4LinuxRyzen 7 1700NA0.9.50.4 1.786 3.729
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 1.0.3LinuxRyzen 7 1700NA1.0.3 1.881 3.504
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 1.0.4LinuxRyzen 7 1700NA1.0.4 1.867 3.450
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 1.1.01.9383.517LinuxRyzen 7 1700NA1.1.01.7913.466
Linux, Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz, mkin version 1.1.0Linuxi7-4710MQNA1.1.0 1.621 3.123
LinuxRyzen 7 17004.1.31.1.01.7913.289
LinuxRyzen 7 17004.2.11.1.01.8603.526
@@ -264,91 +317,142 @@

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.

------ - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - - - - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + +
OSCPURmkin t3 t4 t5
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1LinuxRyzen 7 1700NA0.9.48.1 3.764 14.347 9.495
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1LinuxRyzen 7 1700NA0.9.49.1 4.649 13.789 6.395
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2LinuxRyzen 7 1700NA0.9.49.2 4.786 8.461 5.675
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3LinuxRyzen 7 1700NA0.9.49.3 4.510 13.805 7.386
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4LinuxRyzen 7 1700NA0.9.49.4 4.446 15.335 6.002
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2LinuxRyzen 7 1700NA0.9.50.2 1.402 6.174 2.764
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.3LinuxRyzen 7 1700NA0.9.50.3 1.430 6.615 2.878
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.4LinuxRyzen 7 1700NA0.9.50.4 1.397 7.251 2.810
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 1.0.3LinuxRyzen 7 1700NA1.0.3 1.430 6.344 2.798
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 1.0.4LinuxRyzen 7 1700NA1.0.4 1.415 6.364 2.820
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 1.1.01.4706.5082.894LinuxRyzen 7 1700NA1.1.03.90121.5748.564
Linux, Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz, mkin version 1.1.0Linuxi7-4710MQNA1.1.0 3.319 18.209 7.773
LinuxRyzen 7 17004.1.31.1.01.3106.2792.681
LinuxRyzen 7 17004.2.11.1.04.23723.8829.508
@@ -357,17 +461,11 @@

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.

--------- - + + + + @@ -377,7 +475,10 @@ - + + + + @@ -386,7 +487,10 @@ - + + + + @@ -395,7 +499,10 @@ - + + + + @@ -404,7 +511,10 @@ - + + + + @@ -413,7 +523,10 @@ - + + + + @@ -422,7 +535,10 @@ - + + + + @@ -431,7 +547,10 @@ - + + + + @@ -440,7 +559,10 @@ - + + + + @@ -449,7 +571,10 @@ - + + + + @@ -458,7 +583,10 @@ - + + + + @@ -467,16 +595,22 @@ - - - - - - - + + + + + + + + + + - + + + + @@ -484,6 +618,30 @@ + + + + + + + + + + + + + + + + + + + + + + + +
OSCPURmkin t6 t7 t8
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1LinuxRyzen 7 1700NA0.9.48.1 2.623 4.587 7.52531.267
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1LinuxRyzen 7 1700NA0.9.49.1 2.542 4.128 4.6325.636
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2LinuxRyzen 7 1700NA0.9.49.2 2.723 4.478 4.8625.574
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3LinuxRyzen 7 1700NA0.9.49.3 2.643 4.374 7.0207.365
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4LinuxRyzen 7 1700NA0.9.49.4 2.635 4.259 4.7375.626
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2LinuxRyzen 7 1700NA0.9.50.2 0.777 1.236 1.3322.987
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.3LinuxRyzen 7 1700NA0.9.50.3 0.858 1.264 1.3333.073
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.4LinuxRyzen 7 1700NA0.9.50.4 0.783 1.282 1.4863.105
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 1.0.3LinuxRyzen 7 1700NA1.0.3 0.763 1.244 1.4572.839
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 1.0.4LinuxRyzen 7 1700NA1.0.4 0.785 1.252 1.4662.826
Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 1.1.00.8101.2641.5033.0961.9842.847LinuxRyzen 7 1700NA1.1.03.0884.3245.11410.9886.8009.860
Linux, Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz, mkin version 1.1.0Linuxi7-4710MQNA1.1.0 2.348 3.579 4.2545.981 8.368
LinuxRyzen 7 17004.1.31.1.00.7441.2271.2883.5531.8952.738
LinuxRyzen 7 17004.2.11.1.03.3504.7355.50711.8607.17910.934
@@ -507,7 +665,7 @@

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.5.

-- cgit v1.2.1