search for: fnrosenbrock

Displaying 1 result from an estimated 1 matches for "fnrosenbrock".

2023 Aug 13
4
Noisy objective functions
...pplications, I got interested in optimizing noisy objective functions. As an (artificial) example, the following is the Rosenbrock function, where Gaussian noise of standard deviation `sd = 0.01` is added to the function value. fn <- function(x) (1+rnorm(1, sd=0.01)) * adagio::fnRosenbrock(x) To smooth out the noise, define another function `fnk(x, k = 1)` that calls `fn` k times and returns the mean value of those k function applications. fnk <- function(x, k = 1) { # fnk(x) same as fn(x) rv = 0.0 for (i in 1:k) rv <- rv + fn(x) return(rv/n)...