You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Surrogates
#sphere function
function s(x)
return sum(x .^ 2)
end
n = 30
d = 3
lb = [-10.0 for i in 1:d]
ub = [10.0 for i in 1:d]
x = sample(n, lb, ub, SobolSample())
y = s.(x)
r = RadialBasis(x, s.(x), lb, ub, rad = linearRadial())
size(r.x) #(30,)
size(r.y) #(30,)
surrogate_optimize(s, SRBF(), lb, ub, r, UniformSample())
size(r.x) #(165,)
size(r.y) #(165,)
Should we be indicating that the function mutates with the ! convention (i.e. surrogate_optimize!(s, SRBF(), lb, ub, r, UniformSample()))?
The text was updated successfully, but these errors were encountered:
The optimization functions in surrogates mutate the surrogate struct.
To reproduce:
Should we be indicating that the function mutates with the
!
convention (i.e.surrogate_optimize!(s, SRBF(), lb, ub, r, UniformSample())
)?The text was updated successfully, but these errors were encountered: