A Param to describe categorical (factor) parameters.

Format

R6::R6Class object inheriting from Param.

Construction

ParamFct$new(id, levels, special_vals = list(), default = NO_DEF, tags = character())

Arguments of Param, and additionally:

Fields

Fields of Param, and additionally:

  • lower :: numeric(1)
    Lower bound. Always NA for this parameter.

  • upper :: numeric(1)
    Upper bound. Always NA for this parameter.

  • levels :: character()
    Allowed levels.

  • nlevels :: Inf
    Number of categorical levels.

  • is_bounded :: TRUE
    Are the bounds finite? Always TRUE for this parameter.

Methods

See Param.

See also

Examples

ParamFct$new("f", levels = letters[1:3])
#> id class lower upper levels default #> 1: f ParamFct NA NA a,b,c <NoDefault>