Learn R Programming

soobench (version 1.9.18)

random_parameters: Random parameter generation

Description

Generate random parameter(s) for a given function.

Usage

random_parameters(n, fn)

random_parameter(fn)

Arguments

n

[integer(1)] Number of parameters to generate.

fn

[soo_function] Test function.

Value

For random_parameters, a matrix containing the parameter settings in the columns of the matrix. random_parameter returns a numeric vector with a single parameter setting for the given function.

Details

Given a test function fn, generate n random parameter settings for that function.

Examples

Run this code
# NOT RUN {
fn <- generate_ackley_function(10)
X <- random_parameters(100, fn)
str(X)
y <- fn(X)

# }

Run the code above in your browser using DataLab