From f820bf5b91be0f589de16c3e3250f5f79672df75 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 28 Oct 2022 13:39:15 +0200 Subject: Rename parhist to parplot and make it generic That parhist name was not the brightest idea, as it does not show histograms. --- .../multistart/llhist-for-biphasic-saemix-fit.svg | 1 + .../_snaps/multistart/llhist-for-sfo-fit.svg | 2 +- .../multistart/parhist-for-biphasic-saemix-fit.svg | 195 --------------------- .../_snaps/multistart/parhist-for-sfo-fit.svg | 106 ----------- .../multistart/parplot-for-biphasic-saemix-fit.svg | 195 +++++++++++++++++++++ .../_snaps/multistart/parplot-for-sfo-fit.svg | 106 +++++++++++ tests/testthat/test_multistart.R | 8 +- 7 files changed, 307 insertions(+), 306 deletions(-) delete mode 100644 tests/testthat/_snaps/multistart/parhist-for-biphasic-saemix-fit.svg delete mode 100644 tests/testthat/_snaps/multistart/parhist-for-sfo-fit.svg create mode 100644 tests/testthat/_snaps/multistart/parplot-for-biphasic-saemix-fit.svg create mode 100644 tests/testthat/_snaps/multistart/parplot-for-sfo-fit.svg (limited to 'tests') diff --git a/tests/testthat/_snaps/multistart/llhist-for-biphasic-saemix-fit.svg b/tests/testthat/_snaps/multistart/llhist-for-biphasic-saemix-fit.svg index fa92c92a..fe38865d 100644 --- a/tests/testthat/_snaps/multistart/llhist-for-biphasic-saemix-fit.svg +++ b/tests/testthat/_snaps/multistart/llhist-for-biphasic-saemix-fit.svg @@ -50,6 +50,7 @@ + original fit diff --git a/tests/testthat/_snaps/multistart/llhist-for-sfo-fit.svg b/tests/testthat/_snaps/multistart/llhist-for-sfo-fit.svg index 4342df9b..98513d06 100644 --- a/tests/testthat/_snaps/multistart/llhist-for-sfo-fit.svg +++ b/tests/testthat/_snaps/multistart/llhist-for-sfo-fit.svg @@ -50,7 +50,7 @@ - + original fit diff --git a/tests/testthat/_snaps/multistart/parhist-for-biphasic-saemix-fit.svg b/tests/testthat/_snaps/multistart/parhist-for-biphasic-saemix-fit.svg deleted file mode 100644 index 75519b07..00000000 --- a/tests/testthat/_snaps/multistart/parhist-for-biphasic-saemix-fit.svg +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -parent_0 -f_parent_to_m1 -k2 -g -a.1 -b.1 -SD.log_k_m1 -SD.log_k1 -SD.g_qlogis - - - - - -0.5 -1.0 -1.5 -2.0 -Normalised parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Starting parameters -Original run -Multistart runs - - diff --git a/tests/testthat/_snaps/multistart/parhist-for-sfo-fit.svg b/tests/testthat/_snaps/multistart/parhist-for-sfo-fit.svg deleted file mode 100644 index f3373901..00000000 --- a/tests/testthat/_snaps/multistart/parhist-for-sfo-fit.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -parent_0 -k_parent -a.1 -b.1 -SD.k_parent - - - - - -0.5 -1.0 -1.5 -2.0 -Normalised parameters - - - - - - - - - - - - - - - -Starting parameters -Original run -Multistart runs - - diff --git a/tests/testthat/_snaps/multistart/parplot-for-biphasic-saemix-fit.svg b/tests/testthat/_snaps/multistart/parplot-for-biphasic-saemix-fit.svg new file mode 100644 index 00000000..75519b07 --- /dev/null +++ b/tests/testthat/_snaps/multistart/parplot-for-biphasic-saemix-fit.svg @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +parent_0 +f_parent_to_m1 +k2 +g +a.1 +b.1 +SD.log_k_m1 +SD.log_k1 +SD.g_qlogis + + + + + +0.5 +1.0 +1.5 +2.0 +Normalised parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Starting parameters +Original run +Multistart runs + + diff --git a/tests/testthat/_snaps/multistart/parplot-for-sfo-fit.svg b/tests/testthat/_snaps/multistart/parplot-for-sfo-fit.svg new file mode 100644 index 00000000..f3373901 --- /dev/null +++ b/tests/testthat/_snaps/multistart/parplot-for-sfo-fit.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +parent_0 +k_parent +a.1 +b.1 +SD.k_parent + + + + + +0.5 +1.0 +1.5 +2.0 +Normalised parameters + + + + + + + + + + + + + + + +Starting parameters +Original run +Multistart runs + + diff --git a/tests/testthat/test_multistart.R b/tests/testthat/test_multistart.R index e4885191..56eb140c 100644 --- a/tests/testthat/test_multistart.R +++ b/tests/testthat/test_multistart.R @@ -25,14 +25,14 @@ test_that("multistart works for saem.mmkin models", { skip_on_travis() # Plots are platform dependent llhist_sfo <- function() llhist(saem_sfo_s_multi) - parhist_sfo <- function() parhist(saem_sfo_s_multi, ylim = c(0.5, 2)) + parplot_sfo <- function() parplot(saem_sfo_s_multi, ylim = c(0.5, 2)) vdiffr::expect_doppelganger("llhist for sfo fit", llhist_sfo) - vdiffr::expect_doppelganger("parhist for sfo fit", parhist_sfo) + vdiffr::expect_doppelganger("parplot for sfo fit", parplot_sfo) llhist_biphasic <- function() llhist(saem_biphasic_m_multi) - parhist_biphasic <- function() parhist(saem_biphasic_m_multi, + parplot_biphasic <- function() parplot(saem_biphasic_m_multi, ylim = c(0.5, 2)) vdiffr::expect_doppelganger("llhist for biphasic saemix fit", llhist_biphasic) - vdiffr::expect_doppelganger("parhist for biphasic saemix fit", parhist_biphasic) + vdiffr::expect_doppelganger("parplot for biphasic saemix fit", parplot_biphasic) }) -- cgit v1.2.1