RunExperiment {rrepast} | R Documentation |
Run an experimental setup
Description
Run the model multiple times for different parameters given by design matrix function parameter.
Usage
RunExperiment(e, r = 1, design, FUN)
Arguments
e |
An engine object instance |
r |
The number of experiment replications |
design |
The desing matrix holding parameter sampling |
FUN |
THe calibration function. |
Details
The FUN function must return zero for perfect fit and values greater than zero otherwise.
Value
A list with output and dataset
Examples
## Not run:
my.cost<- function(params, results) { # your best fit calculation, being 0 the best metric. }
d<- "c:/usr/models/your-model-directory"
m<- Model(d,dataset="ds::Output")
Load(m)
f<- AddFactor(name="cyclePoint",min=40,max=90)
f<- AddFactor(factors=f, name="conjugationCost",min=1,max=80)
d<- LatinHypercube(factors=f)
p<- GetSimulationParameters(e)
exp.design<- BuildParameterSet(d,p)
v<- RunExperiment(e,r=1,exp.design,my.cost)
## End(Not run)
[Package rrepast version 0.8.0 Index]