View source: R/experiment_utils.R
plot_cumulative_assignment | R Documentation |
Generates a plot of the cumulative assignment.
plot_cumulative_assignment(results, batch_sizes)
results |
List. Results of the experiment, including the actions taken ( |
batch_sizes |
Integer vector. Batch sizes used in the experiment. Must be positive integers. |
A plot of the cumulative assignment.
set.seed(123)
A <- 1000
K <- 4
xs <- matrix(runif(A * K), nrow = A, ncol = K)
ys <- matrix(rbinom(A * K, 1, 0.5), nrow = A, ncol = K)
batch_sizes <- c(250, 250, 250, 250)
results <- run_experiment(ys = ys,
floor_start = 1/K,
floor_decay = 0.9,
batch_sizes = batch_sizes,
xs = xs)
plot_cumulative_assignment(results, batch_sizes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.