R6_par_discretenum: R6 object for discrete numeric

R6_par_discretenumR Documentation

R6 object for discrete numeric

Description

R6 object for discrete numeric

R6 object for discrete numeric

Details

Parameter with uniform distribution for hyperparameter optimization

Super class

comparer::par_hype -> par_discretenum

Public fields

name

Name of the parameter, must match the input to 'eval_func'.

values

Values, discrete numeric

ggtrans

Transformation for ggplot, see ggplot2::scale_x_continuous()

Methods

Public methods


Method fromraw()

Function to convert from raw scale to transformed scale

Usage
R6_par_discretenum$fromraw(x)
Arguments
x

Value of raw scale


Method toraw()

Function to convert from transformed scale to raw scale

Usage
R6_par_discretenum$toraw(x)
Arguments
x

Value of transformed scale


Method generate()

Generate values in the raw space based on quantiles.

Usage
R6_par_discretenum$generate(q)
Arguments
q

In [0,1].


Method getseq()

Get a sequence, uniform on the transformed scale

Usage
R6_par_discretenum$getseq(n)
Arguments
n

Number of points. Ignored for discrete.


Method isvalid()

Check if input is valid for parameter

Usage
R6_par_discretenum$isvalid(x)
Arguments
x

Parameter value


Method convert_to_mopar()

Convert this to a parameter for the mixopt R package.

Usage
R6_par_discretenum$convert_to_mopar(raw_scale = FALSE)
Arguments
raw_scale

Should it be on the raw scale?


Method new()

Create a hyperparameter with uniform distribution

Usage
R6_par_discretenum$new(name, values)
Arguments
name

Name of the parameter, must match the input to 'eval_func'.

values

Numeric values, must be in ascending order


Method print()

Print details of the object.

Usage
R6_par_discretenum$print(...)
Arguments
...

not used


Method clone()

The objects of this class are cloneable with this method.

Usage
R6_par_discretenum$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

p1 <- R6_par_discretenum$new('x1', 0:2)
class(p1)
print(p1)

comparer documentation built on March 7, 2023, 7:49 p.m.