Description Usage Arguments Creating a parameter Serialisation See Also Examples
Multiple parameters can be combined in a parameter set. The sections below contain information on how to create, serialise and process a parameter.
1 2 3 4 5 6 7 8 9 10 | parameter(id, default, ..., description = NULL, tuneable = TRUE)
## S3 method for class 'parameter'
as.list(x, ...)
as_parameter(li)
is_parameter(x)
as_descriptive_tibble(x)
|
id |
The name of the parameter. |
default |
The default value of the parameter. |
... |
Extra fields to be saved in the parameter. |
description |
An optional (but recommended) description of the parameter. |
tuneable |
Whether or not a parameter is tuneable. |
x |
An object (parameter or distribution) to be converted. |
li |
A list to be converted into a parameter. |
character_parameter()
, integer_parameter()
, logical_parameter()
, numeric_parameter()
: Creating parameters with basic R data types.
integer_range_parameter()
, numeric_range_parameter()
: Create a discrete or continuous range parameter.
subset_parameter()
: A parameter containing a subset of a set of values.
parameter()
: An abstract function to be used by other parameter functions.
as.list(param)
: Converting a parameter to a list.
as_parameter(li)
: Converting a list back to a parameter.
is_parameter(x)
: Checking whether something is a parameter.
as_descriptive_tibble(param)
: Convert to a tibble containing meta information.
dynparam for an overview of all dynparam functionality.
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 26 27 28 29 30 31 | int_param <- integer_parameter(
id = "num_iter",
default = 100L,
distribution = expuniform_distribution(lower = 1L, upper = 10000L),
description = "Number of iterations"
)
print(int_param)
li <- as.list(int_param)
print(as_parameter(li))
subset_param <- 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)"
)
int_range_param <- 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"
)
parameter_set(
int_param,
subset_param,
int_range_param
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.