dict_mutators_gauss | R Documentation |
Individuals are mutated with an independent normal random variable on each component.
sdev
:: numeric
Standard deviation of normal distribuion. This is absolute if sdev_is_relative
is FALSE
, and
multiplied with each individual component's range (upper - lower) if sdev_is_relative
is TRUE
.
This may either be a scalar, in which case it is applied to all input components, or a vector,
in which case it must have the length of the input and applies to components in order in which
they appear in the priming ParamSet
. Must be set by the user.
sdev_is_relative
:: logical(1)
Whether sdev
is absolute (FALSE
) or relative to component range (TRUE
). Initialized to FALSE
.
truncated_normal
:: logical(1)
Whether to draw individuals from a normal distribution that is truncated at the bounds of each
component (TRUE
), or to draw from a normal distribution and then restrict to bounds afterwards
(FALSE
). The former (TRUE
) will lead to very few to no samples landing on the exact bounds
(analytically it would be none almost surely, but this is subject to machine precision), the latter
(FALSE
) can lead to a substantial number of samples landing on the exact bounds. Initialized to FALSE
.
Supported Domain
classes are: p_int
('ParamInt'), p_dbl
('ParamDbl')
This Mutator
can be created with the short access form mut()
(muts()
to get a list), or through the the dictionary
dict_mutators
in the following way:
# preferred: mut("gauss") muts("gauss") # takes vector IDs, returns list of Mutators # long form: dict_mutators$get("gauss")
miesmuschel::MiesOperator
-> miesmuschel::Mutator
-> miesmuschel::MutatorNumeric
-> MutatorGauss
new()
Initialize the MutatorGauss
object.
MutatorGauss$new()
clone()
The objects of this class are cloneable with this method.
MutatorGauss$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other mutators:
Mutator
,
MutatorDiscrete
,
MutatorNumeric
,
OperatorCombination
,
dict_mutators_cmpmaybe
,
dict_mutators_erase
,
dict_mutators_maybe
,
dict_mutators_null
,
dict_mutators_proxy
,
dict_mutators_sequential
,
dict_mutators_unif
set.seed(1)
mg = mut("gauss", sdev = 0.1)
p = ps(x = p_int(-5, 5), y = p_dbl(-5, 5))
data = data.frame(x = rep(0, 5), y = rep(0, 5))
mg$prime(p)
mg$operate(data)
mg$param_set$values$sdev = 100
mg$operate(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.