From a26b44d15c11ebb41083fc2efab0cc91a027b55b Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 18 Apr 2015 00:06:38 +0200 Subject: Add a vignette showing the performance of compiled models --- man/mkinfit.Rd | 16 ++++++++++------ man/mkinpredict.Rd | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'man') diff --git a/man/mkinfit.Rd b/man/mkinfit.Rd index 5f43e145..801f540c 100644 --- a/man/mkinfit.Rd +++ b/man/mkinfit.Rd @@ -21,7 +21,7 @@ mkinfit(mkinmod, observed, parms.ini = "auto", state.ini = "auto", fixed_parms = NULL, fixed_initials = names(mkinmod$diffs)[-1], - solution_type = c("auto", "analytical", "eigen", "deSolve") + solution_type = c("auto", "analytical", "eigen", "deSolve"), method.ode = "lsoda", use_compiled = "auto", method.modFit = c("Port", "Marq", "SANN", "Nelder-Mead", "BFGS", "CG", "L-BFGS-B"), @@ -241,11 +241,15 @@ SFO_SFO <- mkinmod( parent = list(type = "SFO", to = "m1", sink = TRUE), m1 = list(type = "SFO")) # Fit the model to the FOCUS example dataset D using defaults -system.time(fit <- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen")) -system.time(fit.deSolve <- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "deSolve", use_compiled = FALSE)) -system.time(fit.deSolve.compiled <- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "deSolve", use_compiled = TRUE)) -# The performance benefit of using the compiled version is immense compared with deSolve without compilation, and -# about a factor of two compared with the eigenvalue based solution +system.time(fit <- mkinfit(SFO_SFO, FOCUS_2006_D, + solution_type = "eigen")) +system.time(fit.deSolve <- mkinfit(SFO_SFO, FOCUS_2006_D, + solution_type = "deSolve", use_compiled = FALSE)) +system.time(fit.deSolve.compiled <- mkinfit(SFO_SFO, FOCUS_2006_D, + solution_type = "deSolve", use_compiled = TRUE)) +# The performance benefit of using the compiled version is immense compared +# with deSolve without compilation, and about a factor of two compared with the +# eigenvalue based solution coef(fit) coef(fit.deSolve) coef(fit.deSolve.compiled) diff --git a/man/mkinpredict.Rd b/man/mkinpredict.Rd index 7450a7ce..c6aee75f 100644 --- a/man/mkinpredict.Rd +++ b/man/mkinpredict.Rd @@ -10,7 +10,7 @@ } \usage{ mkinpredict(mkinmod, odeparms, odeini, outtimes, solution_type = "deSolve", - method.ode = "lsoda", use_compiled = "auto", atol = 1e-08, rtol = 1e-10, + use_compiled = "auto", method.ode = "lsoda", atol = 1e-08, rtol = 1e-10, map_output = TRUE, ...) } \arguments{ -- cgit v1.2.1