funError | R Documentation |
Simulate NAs, Infs, NaNs in results from objective function evaluations
funError(x, prob = 0.1, errorList = list(NA, Inf, NaN), outDim = 1)
x |
input vector or matrix of candidate solution |
prob |
error probability (0<prob<1). Default: 0.1 |
errorList |
list with error types. Default: |
outDim |
dimension of the output matrix (number of columns) |
Results from funSphere
are replaced with NA
, NaN
, and Inf
values.
vector of objective function values
is.finite
set.seed(123) require(SPOT) x <- matrix(1:10, 5,2) y <- funError(x) any(is.na(y)) ## two-dim output funError(x,outDim=2) funError(x,outDim=2, prob=0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.