sim_dataset | R Documentation |
Generate the simulations of the expert_matrix
sim_dataset( alpha, x, expert_matrix = NULL, comp_dist, params_list, exposure = rep(1, dim(x)[1]) )
alpha |
( |
x |
( |
expert_matrix |
( |
comp_dist |
( |
params_list |
( |
exposure |
A N*1 vector that contain the exposure value for each column in expert_matrix |
A N*D simulation matrix of expert_matrix.
#alpha = matrix(runif(20,-1,1), nrow = 4) #x = matrix(runif(35, -1, 1), nrow = 7) #params = matrix(list( list(meanlog = 100, sdlog = 2), list(meanlog = 100, sdlog = 2), # list(meanlog = 333, sdlog = 1), list(meanlog = 533, sdlog = 1), # list(meanlog = 1, sdlog = 2), list(meanlog = 1, sdlog = 2), # list(meanlog = 3, sdlog = 1), list(meanlog = 5, sdlog = 1)), # nrow = 2, byrow = T) # expert_names = matrix( c("lognormal", "lognormal", "lognormal", "lognormal", # "lognormal", "lognormal", "lognormal", "lognormal"), nrow = 2, byrow = T) #expert_matrix = ExpertMatrix$new(expert_matrix = expert_names, expert_params_matrix = params) #for(expert in expert_matrix$expert_matrix) { # expert$set_penalty_params(c(1,1,1)) # expert$initialize_penalty() #} #exposure_list = c(1,2,1,2,2,2,1) #sim_dataset(alpha, x, expert_matrix, exposure = exposure_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.