test_func_applyMO: General function for evaluating a test function with...

View source: R/test_func_apply.R

test_func_applyMOR Documentation

General function for evaluating a test function with multivariate output

Description

General function for evaluating a test function with multivariate output

Usage

test_func_applyMO(
  func,
  x,
  numoutdim,
  scale_it,
  scale_low,
  scale_high,
  noise = 0,
  ...
)

Arguments

func

A function to evaluate

x

Input value, either a matrix whose rows are points or a vector for a single point. Be careful with 1-D functions.

numoutdim

Number of output dimensions

scale_it

Should the data be scaled from [0, 1]^D to [scale_low, scale_high]? This means the input data is confined to be in [0, 1]^D, but the function isn't.

scale_low

Lower bound for each variable

scale_high

Upper bound for each variable

noise

If white noise should be added, specify the standard deviation for normal noise

...

Additional parameters for func

Value

Function values at x

Examples

x <- matrix(seq(0,1,length.out=10), ncol=1)
y <- test_func_apply(sin, x, TRUE, 0, 2*pi, .05)
plot(x,y)
curve(sin(2*pi*x), col=2, add=TRUE)

TestFunctions documentation built on May 29, 2024, 11 a.m.