parameter_set: Parameter set helper functions

Description Usage Arguments Parameter set instatiations Serialisation See Also Examples

Description

Parameter set helper functions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
parameter_set(..., parameters = NULL, forbidden = NULL)

is_parameter_set(x)

## S3 method for class 'parameter_set'
as.list(x, ...)

as_parameter_set(li)

get_defaults(x)

sip(x, n = 1, as_tibble = TRUE)

as_paramhelper(x)

Arguments

...

Parameters to wrap in a parameter set.

parameters

A list of parameters to wrap in a parameter set.

forbidden

States forbidden region of parameter via a character vector, which will be turned into an expression.

x

An object for which to check whether it is a parameter set.

li

A list to be converted into a parameter set.

n

Number of objects to return.

as_tibble

Whether or not to return as a tibble.

Parameter set instatiations

Serialisation

See Also

dynparam for an overview of all dynparam functionality.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
parameters <- parameter_set(
  integer_parameter(
    id = "num_iter",
    default = 100L,
    distribution = expuniform_distribution(lower = 1L, upper = 10000L),
    description = "Number of iterations"
  ),
  subset_parameter(
    id = "dimreds",
    default = c("pca", "mds"),
    values = c("pca", "mds", "tsne", "umap", "ica"),
    description = "Which dimensionality reduction methods to apply (can be multiple)"
  ),
  integer_range_parameter(
    id = "ks",
    default = c(3L, 15L),
    lower_distribution = uniform_distribution(1L, 5L),
    upper_distribution = uniform_distribution(10L, 20L),
    description = "The numbers of clusters to be evaluated"
  )
)

get_defaults(parameters)

sip(parameters, n = 1)

dynverse/dynparam documentation built on May 29, 2019, 8 a.m.