View source: R/sample_params.R
sample_params | R Documentation |
sample values in given distribution
sample_params(bounds_list, n, seed = NULL)
bounds_list |
Either a (optionnally named) list containing a vector of
upper and lower bounds ( |
n |
The number of values to sample for each parameter |
seed |
The seed of the random generator (optional, default value=NULL) |
For the moment only works with uniform distributions but will be hopefully soon extended to any distribution. Use genetic LHS (from lhs package)
A vector or data.frame containing the sampled values (nrow=n)
bounds_list <- list(lb = c(0, 1, 2), ub = c(1, 2, 3))
CroptimizR:::sample_params(bounds_list, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.