From 19861806ed790dc55380c64c6a5e27ba7ecd52de Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 13 Feb 2023 06:23:02 +0100 Subject: WIP adapting to new deSolve with faster lsoda --- vignettes/web_only/benchmarks.html | 99 +++++++++++++++++++++++++++------ vignettes/web_only/mkin_benchmarks.rda | Bin 1722 -> 1777 bytes 2 files changed, 83 insertions(+), 16 deletions(-) (limited to 'vignettes') diff --git a/vignettes/web_only/benchmarks.html b/vignettes/web_only/benchmarks.html index 451d8afe..fb799462 100644 --- a/vignettes/web_only/benchmarks.html +++ b/vignettes/web_only/benchmarks.html @@ -1592,7 +1592,7 @@ div.tocify {

Benchmark timings for mkin

Johannes Ranke

-

Last change 14 July 2022 (rebuilt 2023-01-05)

+

Last change 14 July 2022 (rebuilt 2023-02-13)

@@ -1636,11 +1636,31 @@ FOMC_SFO <- mkinmod( DFOP_SFO <- mkinmod( parent = mkinsub("FOMC", "m1"), # erroneously used FOMC twice, not fixed for consistency 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), +t3 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D)))[["elapsed"]] +
## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+
t4 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
+    error_model = "tc"))[["elapsed"]]
+
## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+
t5 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
     error_model = "obs"))[["elapsed"]]
+
## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable

Two metabolites, synthetic data:

m_synth_SFO_lin <- mkinmod(parent = mkinsub("SFO", "M1"),
                            M1 = mkinsub("SFO", "M2"),
@@ -1656,18 +1676,36 @@ 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),
+t6 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a)))[["elapsed"]]
+
## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+
t7 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c)))[["elapsed"]]
+
## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+
t8 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a),
+    error_model = "tc"))[["elapsed"]]
+
## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+
t9 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
+    error_model = "tc"))[["elapsed"]]
+
## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+
t10 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a),
+    error_model = "obs"))[["elapsed"]]
+
## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+
t11 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
     error_model = "obs"))[["elapsed"]]
+
## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable
+## Error in mkinmod[["symbols"]] : 
+##   object of type 'closure' is not subsettable

Results

@@ -1858,6 +1896,14 @@ models fitted to two datasets, i.e. eight fits for each test.

1.308 1.793 + +Linux +Ryzen 9 7950X 16-Core Processor +4.2.2 +1.3.0 +1.271 +1.787 +
@@ -2068,6 +2114,15 @@ for each test.

2.364 1.230 + +Linux +Ryzen 9 7950X 16-Core Processor +4.2.2 +1.3.0 +0.526 +0.623 +0.631 + @@ -2344,6 +2399,18 @@ dataset, i.e. one fit for each test.

0.801 1.093 + +Linux +Ryzen 9 7950X 16-Core Processor +4.2.2 +1.3.0 +0.242 +0.237 +0.238 +0.239 +0.237 +0.237 + diff --git a/vignettes/web_only/mkin_benchmarks.rda b/vignettes/web_only/mkin_benchmarks.rda index 64ac2680..93138541 100644 Binary files a/vignettes/web_only/mkin_benchmarks.rda and b/vignettes/web_only/mkin_benchmarks.rda differ -- cgit v1.2.1