dream6_design: Simulates the active design process using the comparison...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/dream6_design.R

Description

Simulates the active design process.

Usage

1
2
dream6_design(knobj, sample_function, 
	seed, credits = 5000, file_to_save = NULL, verbose = T)

Arguments

knobj

A knowledge list. See knobjs.

sample_function

A sample function that takes a knowledge list as argument and outputs a sample from the associated posterior in a design matrix.

seed

A random number generator seed.

credits

Total credit to be spent.

file_to_save

A file where the updated knowledge list should be saved at each step.

verbose

Should the process print information about on going computation.

Details

This implements the active design procedure using the criterion used by the wining strategy for DREAM6 challenge. If a file name is provided, the resulting object will be saved at the corresponding location at each step of the process. The function requires the global variables experiment_list1 and observables to be available.

Value

An updated knowledge list.

Author(s)

Edouard Pauwels

See Also

knobjs, sample_function_multi_mod_weight, sample_function_single_mod, experiment_list1, observables, sample_function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
data(exps)
data(experiment_list1)
data(observables)

## Generate the knowledge object with correct parameter value
knobj <- generate_our_knowledge(transform_params)

## Initialize with some data
knobj$datas[[1]] <- list(
 manip = experiment_list1$nothing,
 data = add_noise(
  simulate_experiment(knobj$global_parameters$true_params_T, knobj, experiment_list1$nothing)[
   knobj$global_parameters$tspan %in% observables[["mrnaLow"]]$reso, 
   observables[["mrnaLow"]]$obs
  ]
 )
)
knobj$experiments <- paste("nothing", "mrnaLow")


## Decrease parameter values for the example
knobj$global_parameters$max_it <- 2
knobj$global_parameters$n_simu_weights <- 2
knobj$global_parameters$sample_burn_in <- 5
knobj$global_parameters$sample_to_keep1 <- 2
knobj$global_parameters$n_multi_mod <- 2
knobj$global_parameters$final_sample <- 2
knobj$global_parameters$final_sample_design <- 2

## Run the active design (this takes quite some time)
#knobj <- dream6_design(knobj, sample_function_single_mod, seed = 1, credits = 400)

pauwels2014 documentation built on May 1, 2019, 6:29 p.m.