View source: R/select_experiments.R
select_experiments | R Documentation |
Select the experiments to do a Bayesian inference with.
select_experiments(
experiments = list(create_test_experiment()),
marg_liks = NULL,
verbose = FALSE
)
experiments |
a list of one or more pirouette experiments, as can be created by create_experiment. If more than one experiment is provided and a "generative" experiment is part of them, the "generative" one has to be the first in the list. See also:
|
marg_liks |
a data frame with marginal likelihoods/evidences. A test data frame can be created by create_test_marg_liks |
verbose |
if TRUE, show more output |
a list of inference models
Richèl J.C. Bilderbeek
Use check_experiments to check if an object is a list of experiments
if (beautier::is_on_ci()) {
evidences <- create_test_marg_liks(
site_models = list(beautier::create_jc69_site_model()),
clock_models = list(beautier::create_strict_clock_model()),
tree_priors = list(
beautier::create_yule_tree_prior(),
beautier::create_bd_tree_prior()
)
)
evidences$weight <- c(0.9, 0.1) # in favor of Yule
if (rappdirs::app_dir()$os != "win") {
experiment_yule <- create_test_cand_experiment()
experiment_bd <- create_test_cand_experiment()
experiment_bd$inference_model$tree_prior <-
beautier::create_bd_tree_prior()
experiment_yule$beast2_options <- experiment_bd$beast2_options
experiment_yule$inference_model$mcmc <- experiment_bd$inference_model$mcmc
experiment_yule$errors_filename <- experiment_bd$errors_filename
experiments <- list(experiment_yule, experiment_bd)
# Select the experiment.
# In this case, select the candidate experiment with the highest evidence
select_experiments(
experiments = experiments,
marg_liks = evidences
)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.