Learn R Programming

rrepast (version 0.8.0)

RunExperiment: 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.

Value

A list with output and dataset

Details

The FUN function must return zero for perfect fit and values greater than zero otherwise.

Examples

Run this code
# 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) 
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab