A Param to describe categorical (factor) parameters.
Super class
paradox::Param
-> ParamFct
Public fields
levels
(
character()
|NULL
)
Set of allowed levels. AlwaysNULL
for ParamDbl, ParamInt and ParamUty. Alwaysc(TRUE, FALSE)
for ParamLgl.
Active bindings
lower
(
numeric(1)
)
Lower bound. AlwaysNA
for ParamFct, ParamLgl and ParamUty.upper
(
numeric(1)
)
Upper bound. AlwaysNA
for ParamFct, ParamLgl and ParamUty.nlevels
(
integer(1)
|Inf
)
Number of categorical levels. AlwaysInf
for ParamDbl and ParamUty. The number of integers in the range[lower, upper]
, orInf
if unbounded for ParamInt. Always2
for ParamLgl.is_bounded
(
logical(1)
)
Are the bounds finite? AlwaysTRUE
for ParamFct and ParamLgl. AlwaysFALSE
for ParamUty.storage_type
(
character(1)
)
Data type when values of this parameter are stored in a data table or sampled. Always"numeric"
for ParamDbl. Always"character"
for ParamFct. Always"integer"
for ParamInt. Always"logical"
for ParamLgl. Always"list"
for ParamUty.
Methods
Method new()
Creates a new instance of this R6 class.
Arguments
id
(
character(1)
)
Identifier of the object.levels
(
character()
)
Set of allowed levels.special_vals
(
list()
)
Arbitrary special values this parameter is allowed to take, to make it feasible. This allows extending the domain of the parameter. Note that these values are only used in feasibility checks, neither in generating designs nor sampling.default
(
any
)
Default value. Can be from the domain of the parameter or an element ofspecial_vals
. Has value NO_DEF if no default exists.NULL
can be a valid default. The value has no effect onParamSet$values
or the behavior ofParamSet$check()
,$test()
or$assert()
. Thedefault
is intended to be used for documentation purposes. `tags
(
character()
)
Arbitrary tags to group and subset parameters. Some tags serve a special purpose:"required"
implies that the parameters has to be given when settingvalues
in ParamSet.