diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-13 16:20:23 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-13 16:20:23 +0200 |
commit | 218a9c55bd80fb708b15fa7196422f759bfe4b27 (patch) | |
tree | ad4b2aa4b561b3118d1ca8ee5e6b34fbd2dfcfe8 /vignettes/web_only/benchmarks.html | |
parent | 36bc31c52cbe4b686f5562e21ee110380481dff8 (diff) |
Further formatting improvement of benchmark vignette
Also, use .rmd extension instead of .Rmd for vignettes.
Diffstat (limited to 'vignettes/web_only/benchmarks.html')
-rw-r--r-- | vignettes/web_only/benchmarks.html | 136 |
1 files changed, 56 insertions, 80 deletions
diff --git a/vignettes/web_only/benchmarks.html b/vignettes/web_only/benchmarks.html index 821399e4..043b777f 100644 --- a/vignettes/web_only/benchmarks.html +++ b/vignettes/web_only/benchmarks.html @@ -11,7 +11,7 @@ <meta name="author" content="Johannes Ranke" /> -<meta name="date" content="2020-05-12" /> +<meta name="date" content="2020-05-13" /> <title>Benchmark timings for mkin</title> @@ -1583,29 +1583,12 @@ div.tocify { <h1 class="title toc-ignore">Benchmark timings for mkin</h1> <h4 class="author">Johannes Ranke</h4> -<h4 class="date">2020-05-12</h4> +<h4 class="date">2020-05-13</h4> </div> -<p>Each system is characterized by its CPU type, the operating system type and the mkin version. Currently only values for one system are available.</p> -<pre class="r"><code>cpu_model <- benchmarkme::get_cpu()$model_name -operating_system <- Sys.info()[["sysname"]] -mkin_version <- as.character(packageVersion("mkin")) -system_string <- paste0(operating_system, ", ", cpu_model, ", mkin version ", mkin_version) -load("~/git/mkin/vignettes/web_only/mkin_benchmarks.rda") -mkin_benchmarks[system_string, c("CPU", "OS", "mkin")] <- - c(cpu_model, operating_system, mkin_version) - -if (mkin_version > "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) - } -}</code></pre> +<p>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.</p> <div id="test-cases" class="section level2"> <h2>Test cases</h2> <p>Parent only:</p> @@ -1619,17 +1602,14 @@ t2 <- system.time(mmkin_bench(c("SFO", "FOMC", "DFOP <p>One metabolite:</p> <pre class="r"><code>SFO_SFO <- mkinmod( parent = mkinsub("SFO", "m1"), - m1 = mkinsub("SFO"))</code></pre> -<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<pre class="r"><code>FOMC_SFO <- mkinmod( + m1 = mkinsub("SFO")) +FOMC_SFO <- mkinmod( parent = mkinsub("FOMC", "m1"), - m1 = mkinsub("SFO"))</code></pre> -<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<pre class="r"><code>DFOP_SFO <- mkinmod( + m1 = mkinsub("SFO")) +DFOP_SFO <- mkinmod( parent = mkinsub("FOMC", "m1"), - m1 = mkinsub("SFO"))</code></pre> -<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<pre class="r"><code>t3 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D)))[["elapsed"]] + 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), @@ -1667,127 +1647,123 @@ save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks </div> <div id="results" class="section level2"> <h2>Results</h2> -<p>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.</p> -<pre class="r"><code>rownames(mkin_benchmarks) <- as.character(mkin_benchmarks$mkin)</code></pre> +<p>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.</p> <p>Benchmarks for all available error models are shown.</p> <div id="parent-only" class="section level3"> <h3>Parent only</h3> -<p>Constant variance and two-component error model:</p> -<pre class="r"><code>kable(mkin_benchmarks[, c("t1", "t2")])</code></pre> +<p>Constant variance (t1) and two-component error model (t2) for four models fitted to two datasets, i.e. eight fits for each test.</p> <table> <thead> <tr class="header"> -<th></th> -<th align="right">t1</th> -<th align="right">t2</th> +<th align="left">mkin version</th> +<th align="right">t1 [s]</th> +<th align="right">t2 [s]</th> </tr> </thead> <tbody> <tr class="odd"> -<td>0.9.48.1</td> +<td align="left">0.9.48.1</td> <td align="right">3.610</td> <td align="right">11.019</td> </tr> <tr class="even"> -<td>0.9.49.1</td> +<td align="left">0.9.49.1</td> <td align="right">8.184</td> <td align="right">22.889</td> </tr> <tr class="odd"> -<td>0.9.49.2</td> +<td align="left">0.9.49.2</td> <td align="right">7.064</td> <td align="right">12.558</td> </tr> <tr class="even"> -<td>0.9.49.3</td> +<td align="left">0.9.49.3</td> <td align="right">7.296</td> <td align="right">21.239</td> </tr> <tr class="odd"> -<td>0.9.49.4</td> +<td align="left">0.9.49.4</td> <td align="right">5.936</td> <td align="right">20.545</td> </tr> <tr class="even"> -<td>0.9.50.2</td> -<td align="right">1.559</td> -<td align="right">3.929</td> +<td align="left">0.9.50.2</td> +<td align="right">1.547</td> +<td align="right">3.928</td> </tr> </tbody> </table> </div> <div id="one-metabolite" class="section level3"> <h3>One metabolite</h3> -<p>Constant variance, variance by variable and two-component error model:</p> -<pre class="r"><code>kable(mkin_benchmarks[, c("t3", "t4", "t5")])</code></pre> +<p>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.</p> <table> <thead> <tr class="header"> -<th></th> -<th align="right">t3</th> -<th align="right">t4</th> -<th align="right">t5</th> +<th align="left">mkin version</th> +<th align="right">t3 [s]</th> +<th align="right">t4 [s]</th> +<th align="right">t5 [s]</th> </tr> </thead> <tbody> <tr class="odd"> -<td>0.9.48.1</td> +<td align="left">0.9.48.1</td> <td align="right">3.764</td> <td align="right">14.347</td> <td align="right">9.495</td> </tr> <tr class="even"> -<td>0.9.49.1</td> +<td align="left">0.9.49.1</td> <td align="right">4.649</td> <td align="right">13.789</td> <td align="right">6.395</td> </tr> <tr class="odd"> -<td>0.9.49.2</td> +<td align="left">0.9.49.2</td> <td align="right">4.786</td> <td align="right">8.461</td> <td align="right">5.675</td> </tr> <tr class="even"> -<td>0.9.49.3</td> +<td align="left">0.9.49.3</td> <td align="right">4.510</td> <td align="right">13.805</td> <td align="right">7.386</td> </tr> <tr class="odd"> -<td>0.9.49.4</td> +<td align="left">0.9.49.4</td> <td align="right">4.446</td> <td align="right">15.335</td> <td align="right">6.002</td> </tr> <tr class="even"> -<td>0.9.50.2</td> -<td align="right">1.352</td> -<td align="right">6.110</td> -<td align="right">2.841</td> +<td align="left">0.9.50.2</td> +<td align="right">1.371</td> +<td align="right">6.154</td> +<td align="right">2.720</td> </tr> </tbody> </table> </div> <div id="two-metabolites" class="section level3"> <h3>Two metabolites</h3> -<p>Two different datasets, for each constant variance, variance by variable and two-component error model are shown:</p> -<pre class="r"><code>kable(mkin_benchmarks[, paste0("t", 6:11)])</code></pre> +<p>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.</p> <table> <thead> <tr class="header"> -<th></th> -<th align="right">t6</th> -<th align="right">t7</th> -<th align="right">t8</th> -<th align="right">t9</th> -<th align="right">t10</th> -<th align="right">t11</th> +<th align="left">mkin version</th> +<th align="right">t6 [s]</th> +<th align="right">t7 [s]</th> +<th align="right">t8 [s]</th> +<th align="right">t9 [s]</th> +<th align="right">t10 [s]</th> +<th align="right">t11 [s]</th> </tr> </thead> <tbody> <tr class="odd"> -<td>0.9.48.1</td> +<td align="left">0.9.48.1</td> <td align="right">2.623</td> <td align="right">4.587</td> <td align="right">7.525</td> @@ -1796,7 +1772,7 @@ save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks <td align="right">31.267</td> </tr> <tr class="even"> -<td>0.9.49.1</td> +<td align="left">0.9.49.1</td> <td align="right">2.542</td> <td align="right">4.128</td> <td align="right">4.632</td> @@ -1805,7 +1781,7 @@ save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks <td align="right">5.636</td> </tr> <tr class="odd"> -<td>0.9.49.2</td> +<td align="left">0.9.49.2</td> <td align="right">2.723</td> <td align="right">4.478</td> <td align="right">4.862</td> @@ -1814,7 +1790,7 @@ save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks <td align="right">5.574</td> </tr> <tr class="even"> -<td>0.9.49.3</td> +<td align="left">0.9.49.3</td> <td align="right">2.643</td> <td align="right">4.374</td> <td align="right">7.020</td> @@ -1823,7 +1799,7 @@ save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks <td align="right">7.365</td> </tr> <tr class="odd"> -<td>0.9.49.4</td> +<td align="left">0.9.49.4</td> <td align="right">2.635</td> <td align="right">4.259</td> <td align="right">4.737</td> @@ -1832,13 +1808,13 @@ save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks <td align="right">5.626</td> </tr> <tr class="even"> -<td>0.9.50.2</td> -<td align="right">0.759</td> -<td align="right">1.204</td> -<td align="right">1.275</td> -<td align="right">2.837</td> -<td align="right">2.026</td> -<td align="right">2.976</td> +<td align="left">0.9.50.2</td> +<td align="right">0.742</td> +<td align="right">1.203</td> +<td align="right">1.282</td> +<td align="right">2.845</td> +<td align="right">2.037</td> +<td align="right">2.987</td> </tr> </tbody> </table> |