Sampler1DCateg | R Documentation |
Sampling from a discrete distribution, for a ParamSet
containing a single p_fct()
or p_lgl()
.
paradox::Sampler
-> paradox::Sampler1D
-> Sampler1DCateg
prob
(numeric()
| NULL)
Numeric vector of param$nlevels
probabilities.
new()
Creates a new instance of this R6 class.
Sampler1DCateg$new(param, prob = NULL)
param
(ParamSet
)
Domain / support of the distribution we want to sample from.
Must be one-dimensional.
prob
(numeric()
| NULL)
Numeric vector of param$nlevels
probabilities, which is uniform by default.
clone()
The objects of this class are cloneable with this method.
Sampler1DCateg$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other Sampler:
Sampler
,
Sampler1D
,
Sampler1DNormal
,
Sampler1DRfun
,
Sampler1DUnif
,
SamplerHierarchical
,
SamplerJointIndep
,
SamplerUnif
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.