aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-05-11 05:15:19 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-05-11 05:18:32 +0200
commit234c9059a95e104917e488a6ddd2313234a96cdc (patch)
treef6e54098f79d94578434ef727b62f7cc5d5e79b7 /man
parentd113cd79b178fdc91aecb894707ed356129dfb75 (diff)
Avoid merge() and data.frame() in cost function
also for deSolve and eigenvalue based solutions. This noticeably increases performance for these methods, see test.log and benchmark vignette.
Diffstat (limited to 'man')
-rw-r--r--man/mkinpredict.Rd13
1 files changed, 5 insertions, 8 deletions
diff --git a/man/mkinpredict.Rd b/man/mkinpredict.Rd
index 1ba5b5f8..2c9192b7 100644
--- a/man/mkinpredict.Rd
+++ b/man/mkinpredict.Rd
@@ -85,13 +85,14 @@ is 1e-10, much lower than in \code{\link{lsoda}}.}
\item{map_output}{Boolean to specify if the output should list values for
the observed variables (default) or for all state variables (if set to
-FALSE).}
+FALSE). Setting this to FALSE has no effect for analytical solutions,
+as these always return mapped output.}
\item{\dots}{Further arguments passed to the ode solver in case such a
solver is used.}
}
\value{
-A data frame with the solution in wide format
+A matrix with the numeric solution in wide format
}
\description{
This function produces a time series for all the observed variables in a
@@ -129,7 +130,7 @@ mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100),
mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100),
seq(0, 20, by = 0.01))[2001,]
-# Check compiled model versions - they are faster than the eigenvalue based solutions!
+# Comparison of the performance of solution types
SFO_SFO = mkinmod(parent = list(type = "SFO", to = "m1"),
m1 = list(type = "SFO"), use_of_ff = "max")
if(require(rbenchmark)) {
@@ -151,15 +152,11 @@ if(require(rbenchmark)) {
c(parent = 100, m1 = 0), seq(0, 20, by = 0.1),
solution_type = "analytical", use_compiled = FALSE)[201,])
}
- analytical = mkinpredict(SFO_SFO,
- c(k_parent = 0.15, f_parent_to_m1 = 0.5, k_m1 = 0.01),
- c(parent = 100, m1 = 0), seq(0, 20, by = 0.1),
- solution_type = "analytical", use_compiled = FALSE)[201,]
\dontrun{
# Predict from a fitted model
f <- mkinfit(SFO_SFO, FOCUS_2006_C, quiet = TRUE)
- f <- mkinfit(SFO_SFO, FOCUS_2006_C, quiet = TRUE, solution_type = "analytical")
+ f <- mkinfit(SFO_SFO, FOCUS_2006_C, quiet = TRUE, solution_type = "deSolve")
head(mkinpredict(f))
}

Contact - Imprint