Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ParamUty

Untyped Parameter


Description

A Param to describe untyped parameters.

Super class

paradox::Param -> ParamUty

Public fields

custom_check

(function())
Custom function to check the feasibility.

Active bindings

lower

(numeric(1))
Lower bound. Always NA for ParamFct, ParamLgl and ParamUty.

upper

(numeric(1))
Upper bound. Always NA for ParamFct, ParamLgl and ParamUty.

levels

(character() | NULL)
Set of allowed levels. Always NULL for ParamDbl, ParamInt and ParamUty. Always c(TRUE, FALSE) for ParamLgl.

nlevels

(integer(1) | Inf)
Number of categorical levels. Always Inf for ParamDbl and ParamUty. The number of integers in the range [lower, upper], or Inf if unbounded for ParamInt. Always 2 for ParamLgl.

is_bounded

(logical(1))
Are the bounds finite? Always TRUE for ParamFct and ParamLgl. Always FALSE 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

Public methods


Method new()

Creates a new instance of this R6 class.

Usage
ParamUty$new(id, default = NO_DEF, tags = character(), custom_check = NULL)
Arguments
id

(character(1))
Identifier of the object.

default

(any)
Default value. Can be from the domain of the parameter or an element of special_vals. Has value NO_DEF if no default exists. NULL can be a valid default. The value has no effect on ParamSet$values or the behavior of ParamSet$check(), $test() or $assert(). The default 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 setting values in ParamSet.

custom_check

(function())
Custom function to check the feasibility. Function which checks the input. Must return 'TRUE' if the input is valid and a string with the error message otherwise. Defaults to NULL, which means that no check is performed.


Method clone()

The objects of this class are cloneable with this method.

Usage
ParamUty$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Examples

ParamUty$new("untyped", default = Inf)

paradox

Define and Work with Parameter Spaces for Complex Algorithms

v0.7.1
LGPL-3
Authors
Michel Lang [cre, aut] (<https://orcid.org/0000-0001-9754-0393>), Bernd Bischl [aut] (<https://orcid.org/0000-0001-6002-6980>), Jakob Richter [aut] (<https://orcid.org/0000-0003-4481-5554>), Xudong Sun [aut] (<https://orcid.org/0000-0003-3269-2307>), Martin Binder [aut], Marc Becker [ctb] (<https://orcid.org/0000-0002-8115-0400>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.