powered by
Simulate NAs, Infs, NaNs in results from objective function evaluations
funError(x, prob = 0.1, errorList = list(NA, Inf, NaN), outDim = 1)
input vector or matrix of candidate solution
error probability (0<prob<1). Default: 0.1
list with error types. Default: list(NA, Inf, NaN)
list(NA, Inf, NaN)
dimension of the output matrix (number of columns)
vector of objective function values
Results from funSphere are replaced with NA, NaN, and Inf values.
funSphere
NA
NaN
Inf
is.finite
# NOT RUN { 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) # }
Run the code above in your browser using DataLab