Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/random_design.R
Simulates a randim design process.
1 2 | random_design(knobj, sample_function, exps, seed, credits = 5000,
file_to_save = NULL, verbose = T)
|
knobj |
A knowledge list. See |
sample_function |
A sample function that takes a knowledge list as argument and outputs a sample from the associated posterior in a design matrix. |
exps |
A dataframe representing possible experiments to be performed with their cost. See |
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. |
This implements a strategy consisting in choosing experiments randomly. If a file name is provided, the resulting object will be saved at the corresponding location at each step of the process.
An updated knowledge list.
Edouard Pauwels
knobjs
, sample_function_multi_mod_weight
, sample_function_single_mod
, experiment_list1
, observables
, sample_function
, exps
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 32 | 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 <- 3
knobj$global_parameters$sample_burn_in <- 5
knobj$global_parameters$sample_to_keep1 <- 10
knobj$global_parameters$sample_to_keep2 <- 10
knobj$global_parameters$n_multi_mod_weight <- 2
knobj$global_parameters$final_sample <- 5
knobj$global_parameters$final_sample_design <- 5
## Run the random design (this takes quite some time)
#knobj <- random_design(knobj, sample_function_single_mod, exps, seed = 1, credits = 400)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.