@@ -86,16 +86,15 @@ my_linear_ND = LinearSurrogate(x, y, lb, ub)
8686surrogate_optimize (objective_function_ND, SRBF (), lb, ub, my_linear_ND, SobolSample (),
8787 maxiters = 15 )
8888
89- #=
9089# SVM
91- lb = [1.0,1.0]
92- ub = [6.0,6.0]
93- x = sample(5,lb,ub,SobolSample())
94- objective_function_ND = z -> 3* norm(z)+ 1
90+ lb = [1.0 , 1.0 ]
91+ ub = [6.0 , 6.0 ]
92+ x = sample (5 , lb, ub, SobolSample ())
93+ objective_function_ND = z -> 3 * norm (z) + 1
9594y = objective_function_ND .(x)
96- my_SVM_ND = SVMSurrogate(x,y, lb,ub)
97- surrogate_optimize(objective_function_ND,SRBF(),lb,ub,my_SVM_ND,SobolSample(),maxiters=15)
98- =#
95+ my_SVM_ND = SVMSurrogate (x, y, lb, ub)
96+ surrogate_optimize (
97+ objective_function_ND, SRBF (), lb, ub, my_SVM_ND, SobolSample (), maxiters = 15 )
9998
10099# Inverse distance surrogate
101100lb = [1.0 , 1.0 ]
@@ -276,26 +275,24 @@ num_centers = 2
276275surrogate_optimize (objective_function_ND, SOP (num_centers), lb, ub, my_k_SOPND,
277276 SobolSample (), maxiters = 20 )
278277
279- # multi optimization
280- #=
281- f = x -> [x^2, x]
278+ f = x -> [x^ 2 , x]
282279lb = 1.0
283280ub = 10.0
284- x = sample(100, lb, ub, SobolSample())
285- y = f.(x)
281+ x = sample (100 , lb, ub, SobolSample ())
282+ y = f .(x)
286283my_radial_basis_smb = RadialBasis (x, y, lb, ub, rad = linearRadial ())
287- surrogate_optimize(f,SMB(),lb,ub,my_radial_basis_ego, SobolSample())
284+ surrogate_optimize (f, SMB (), lb, ub, my_radial_basis_smb, SobolSample ())
288285
289- f = x -> [x^2, x ]
286+ f = x -> [x, sin (x) ]
290287lb = 1.0
291288ub = 10.0
292- x = sample(100 , lb, ub, SobolSample ())
293- y = f.(x)
289+ x = sample (500 , lb, ub, RandomSample ())
290+ y = f .(x)
294291my_radial_basis_rtea = RadialBasis (x, y, lb, ub, rad = linearRadial ())
295292Z = 0.8 # percentage
296293K = 2 # number of revaluations
297294p_cross = 0.5 # crossing vs copy
298295n_c = 1.0 # hyperparameter for children creation
299296sigma = 1.5 # mutation
300- surrogate_optimize(f,RTEA(Z,K, p_cross,n_c,sigma),lb,ub,my_radial_basis_rtea,SobolSample())
301- =#
297+ surrogate_optimize (f, RTEA (K, Z, p_cross, n_c, sigma), lb, ub,
298+ my_radial_basis_rtea, SobolSample (); maxiters = 10 )
0 commit comments