powered by
General function for evaluating a test function with multivariate output
test_func_applyMO( func, x, numoutdim, scale_it, scale_low, scale_high, noise = 0, ... )
Function values at x
A function to evaluate
Input value, either a matrix whose rows are points or a vector for a single point. Be careful with 1-D functions.
Number of output dimensions
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.
Lower bound for each variable
Upper bound for each variable
If white noise should be added, specify the standard deviation for normal noise
Additional parameters for func
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)
Run the code above in your browser using DataLab