|
28 | 28 | "name": "stdout",
|
29 | 29 | "output_type": "stream",
|
30 | 30 | "text": [
|
31 |
| - "Requirement already satisfied: egobox in d:\\rlafage\\miniconda3\\lib\\site-packages (0.20.0)\n", |
| 31 | + "Requirement already satisfied: egobox in d:\\rlafage\\miniconda3\\lib\\site-packages (0.21.1)\n", |
32 | 32 | "Note: you may need to restart the kernel to use updated packages.\n"
|
33 | 33 | ]
|
34 | 34 | }
|
|
48 | 48 | },
|
49 | 49 | {
|
50 | 50 | "cell_type": "code",
|
51 |
| - "execution_count": 1, |
| 51 | + "execution_count": 2, |
52 | 52 | "id": "0edaf00f",
|
53 | 53 | "metadata": {},
|
54 | 54 | "outputs": [],
|
|
67 | 67 | },
|
68 | 68 | {
|
69 | 69 | "cell_type": "code",
|
70 |
| - "execution_count": 2, |
| 70 | + "execution_count": 3, |
71 | 71 | "id": "af2d82be",
|
72 | 72 | "metadata": {},
|
73 | 73 | "outputs": [],
|
|
97 | 97 | },
|
98 | 98 | {
|
99 | 99 | "cell_type": "code",
|
100 |
| - "execution_count": 3, |
| 100 | + "execution_count": 4, |
101 | 101 | "id": "7f6da807",
|
102 | 102 | "metadata": {},
|
103 | 103 | "outputs": [],
|
|
113 | 113 | },
|
114 | 114 | {
|
115 | 115 | "cell_type": "code",
|
116 |
| - "execution_count": 4, |
| 116 | + "execution_count": 5, |
117 | 117 | "id": "4c436437",
|
118 | 118 | "metadata": {},
|
119 | 119 | "outputs": [],
|
|
163 | 163 | },
|
164 | 164 | {
|
165 | 165 | "cell_type": "code",
|
166 |
| - "execution_count": 5, |
| 166 | + "execution_count": 6, |
167 | 167 | "metadata": {},
|
168 | 168 | "outputs": [],
|
169 | 169 | "source": [
|
170 | 170 | "egor = egx.Egor(xspecs_xsinx, n_cstr=n_cstr_xsinx) # see help(egor) for options"
|
171 | 171 | ]
|
172 | 172 | },
|
173 |
| - { |
174 |
| - "cell_type": "code", |
175 |
| - "execution_count": 6, |
176 |
| - "metadata": {}, |
177 |
| - "outputs": [ |
178 |
| - { |
179 |
| - "name": "stdout", |
180 |
| - "output_type": "stream", |
181 |
| - "text": [ |
182 |
| - "Optimization f=[-15.12510315] at [18.93488354]\n", |
183 |
| - "Optimization history: \n", |
184 |
| - "Inputs = [[ 2.21153062]\n", |
185 |
| - " [18.77163578]\n", |
186 |
| - " [13.74920548]\n", |
187 |
| - " [21.72833442]\n", |
188 |
| - " [ 5.97804153]\n", |
189 |
| - " [18.98973962]\n", |
190 |
| - " [18.92227667]\n", |
191 |
| - " [18.93389886]\n", |
192 |
| - " [18.93605442]\n", |
193 |
| - " [18.93572528]\n", |
194 |
| - " [18.93622111]\n", |
195 |
| - " [18.93402074]\n", |
196 |
| - " [18.93488354]]\n", |
197 |
| - "Outputs = [[ 0.51375253]\n", |
198 |
| - " [-15.10305227]\n", |
199 |
| - " [ -1.23540814]\n", |
200 |
| - " [ -8.43243768]\n", |
201 |
| - " [ 1.75816467]\n", |
202 |
| - " [-15.12263089]\n", |
203 |
| - " [-15.12496448]\n", |
204 |
| - " [-15.12510181]\n", |
205 |
| - " [-15.12510265]\n", |
206 |
| - " [-15.12510302]\n", |
207 |
| - " [-15.12510239]\n", |
208 |
| - " [-15.12510206]\n", |
209 |
| - " [-15.12510315]]\n" |
210 |
| - ] |
211 |
| - } |
212 |
| - ], |
213 |
| - "source": [ |
214 |
| - "res = egor.minimize(xsinx, max_iters=8)\n", |
215 |
| - "print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n", |
216 |
| - "print(\"Optimization history: \")\n", |
217 |
| - "print(f\"Inputs = {res.x_hist}\")\n", |
218 |
| - "print(f\"Outputs = {res.y_hist}\")" |
219 |
| - ] |
220 |
| - }, |
221 | 173 | {
|
222 | 174 | "cell_type": "code",
|
223 | 175 | "execution_count": 7,
|
|
252 | 204 | "name": "stdout",
|
253 | 205 | "output_type": "stream",
|
254 | 206 | "text": [
|
255 |
| - "Optimization f=[-5.50831454e+00 2.56893605e-04 3.19183821e-04] at [2.32952504 3.1787895 ]\n", |
| 207 | + "Optimization f=[-5.50793692e+00 -1.35143852e-04 -5.26158286e-05] at [2.32952661 3.17841031]\n", |
256 | 208 | "Optimization history: \n",
|
257 |
| - "Inputs = [[2.116192 3.17847263]\n", |
258 |
| - " [2.61297469 3.84215954]\n", |
259 |
| - " [0.20495463 0.12974765]\n", |
260 |
| - " [1.74609049 1.41520332]\n", |
261 |
| - " [0.78690036 2.06000352]\n", |
262 |
| - " [1.23901499 2.66900549]\n", |
263 |
| - " [2.74669922 1.80741418]\n", |
264 |
| - " [1.08051143 0.90562675]\n", |
265 |
| - " [1.83948014 0.69215265]\n", |
266 |
| - " [0.30207292 3.26147058]\n", |
267 |
| - " [2.33183324 3.22166327]\n", |
268 |
| - " [1.84609049 1.51520332]\n", |
269 |
| - " [1.9572016 1.62631444]\n", |
270 |
| - " [2.08065839 1.74977119]\n", |
271 |
| - " [2.2178326 1.8869454 ]\n", |
272 |
| - " [2.32952504 3.1787895 ]]\n", |
273 |
| - "Outputs = [[-5.29466464e+00 1.05755418e+00 -7.14251779e-01]\n", |
274 |
| - " [-6.45513422e+00 -3.28864510e+00 2.28334718e+00]\n", |
275 |
| - " [-3.34702283e-01 -2.14095739e+00 -1.96227280e+01]\n", |
276 |
| - " [-3.16129381e+00 -9.77913316e-01 -2.08566190e+00]\n", |
277 |
| - " [-2.84690389e+00 -1.76247506e+00 1.17033681e+00]\n", |
278 |
| - " [-3.90802047e+00 -1.10900911e+00 1.96037216e+00]\n", |
279 |
| - " [-4.55411340e+00 -8.60544460e+00 1.02440059e+00]\n", |
280 |
| - " [-1.98613818e+00 -3.06852892e+00 8.10095347e-01]\n", |
281 |
| - " [-2.53163279e+00 -1.48221975e+00 -3.10437001e+00]\n", |
282 |
| - " [-3.56354351e+00 7.35342282e-01 -1.09206279e+01]\n", |
283 |
| - " [-5.55349650e+00 2.41930062e-02 5.40698847e-02]\n", |
284 |
| - " [-3.36129381e+00 -6.46257395e-01 -2.29753609e+00]\n", |
285 |
| - " [-3.58351604e+00 -3.87718747e-01 -2.35904536e+00]\n", |
286 |
| - " [-3.83042958e+00 -3.06557634e-01 -2.19835191e+00]\n", |
287 |
| - " [-4.10477800e+00 -5.79857215e-01 -1.74245267e+00]\n", |
288 |
| - " [-5.50831454e+00 2.56893605e-04 3.19183821e-04]]\n" |
| 209 | + "Inputs = [[1.55335241 0.36609899]\n", |
| 210 | + " [0.48433871 1.59588025]\n", |
| 211 | + " [2.93418005 2.74753497]\n", |
| 212 | + " [2.58045769 1.77813431]\n", |
| 213 | + " [1.06805821 2.89510289]\n", |
| 214 | + " [1.48471388 3.81690289]\n", |
| 215 | + " [2.37071614 1.10296966]\n", |
| 216 | + " [0.82720969 0.44451136]\n", |
| 217 | + " [2.08425444 3.41673721]\n", |
| 218 | + " [0.08617534 2.39265705]\n", |
| 219 | + " [2.24213008 3.99999996]\n", |
| 220 | + " [2.47071614 1.20296966]\n", |
| 221 | + " [2.58182726 1.31408077]\n", |
| 222 | + " [2.63287837 1.43753756]\n", |
| 223 | + " [2.32952661 3.17841031]]\n", |
| 224 | + "Outputs = [[-1.91945140e+00 -2.59662097e+00 -2.19714000e+00]\n", |
| 225 | + " [-2.08021896e+00 -1.48190609e+00 -5.13533364e+00]\n", |
| 226 | + " [-5.68171502e+00 -1.42792021e+01 2.68270603e+00]\n", |
| 227 | + " [-4.35859200e+00 -4.70895411e+00 1.94930315e-02]\n", |
| 228 | + " [-3.96316111e+00 -1.08641233e+00 2.82595019e+00]\n", |
| 229 | + " [-5.30161677e+00 6.46292378e-01 1.65905814e+00]\n", |
| 230 | + " [-3.47368580e+00 -2.44182980e+00 -1.87313519e+00]\n", |
| 231 | + " [-1.27172105e+00 -3.43784549e+00 -1.19300768e-01]\n", |
| 232 | + " [-5.50099165e+00 1.35506108e+00 -5.26673877e-01]\n", |
| 233 | + " [-2.47883239e+00 3.38256872e-01 -2.59677570e+01]\n", |
| 234 | + " [-6.24213005e+00 1.41054706e+00 4.55267296e-01]\n", |
| 235 | + " [-3.67368580e+00 -3.50219615e+00 -1.22082043e+00]\n", |
| 236 | + " [-3.89590802e+00 -5.19899351e+00 -4.36126757e-01]\n", |
| 237 | + " [-4.07041593e+00 -6.11551899e+00 1.04566960e-04]\n", |
| 238 | + " [-5.50793692e+00 -1.35143852e-04 -5.26158286e-05]]\n" |
289 | 239 | ]
|
290 | 240 | }
|
291 | 241 | ],
|
292 | 242 | "source": [
|
293 | 243 | "res = egor.minimize(g24, max_iters=30)\n",
|
294 | 244 | "print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
|
295 | 245 | "print(\"Optimization history: \")\n",
|
296 |
| - "print(f\"Inputs = {res.x_hist}\")\n", |
297 |
| - "print(f\"Outputs = {res.y_hist}\")" |
| 246 | + "print(f\"Inputs = {res.x_doe}\")\n", |
| 247 | + "print(f\"Outputs = {res.y_doe}\")" |
298 | 248 | ]
|
299 | 249 | },
|
300 | 250 | {
|
|
399 | 349 | "text": [
|
400 | 350 | "Optimization f=[-15.12161154] at [19.]\n",
|
401 | 351 | "Optimization history: \n",
|
402 |
| - "Inputs = [[14.]\n", |
403 |
| - " [ 2.]\n", |
| 352 | + "Inputs = [[22.]\n", |
| 353 | + " [ 1.]\n", |
| 354 | + " [ 9.]\n", |
| 355 | + " [25.]\n", |
404 | 356 | " [21.]\n",
|
405 |
| - " [22.]\n", |
406 | 357 | " [20.]\n",
|
407 | 358 | " [19.]]\n",
|
408 |
| - "Outputs = [[ -2.09283123]\n", |
409 |
| - " [ 0.68929352]\n", |
| 359 | + "Outputs = [[ -7.10960014]\n", |
| 360 | + " [ 1.78601478]\n", |
| 361 | + " [ 5.41123083]\n", |
| 362 | + " [ 11.42919546]\n", |
410 | 363 | " [-11.44370682]\n",
|
411 |
| - " [ -7.10960014]\n", |
412 | 364 | " [-14.15453288]\n",
|
413 | 365 | " [-15.12161154]]\n"
|
414 | 366 | ]
|
|
423 | 375 | "res = egor.minimize(mixint_xsinx, max_iters=30)\n",
|
424 | 376 | "print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
|
425 | 377 | "print(\"Optimization history: \")\n",
|
426 |
| - "print(f\"Inputs = {res.x_hist}\")\n", |
427 |
| - "print(f\"Outputs = {res.y_hist}\")" |
| 378 | + "print(f\"Inputs = {res.x_doe}\")\n", |
| 379 | + "print(f\"Outputs = {res.y_doe}\")" |
428 | 380 | ]
|
429 | 381 | },
|
430 | 382 | {
|
|
553 | 505 | "res = egor.minimize(mixobj, max_iters=10)\n",
|
554 | 506 | "print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
|
555 | 507 | "print(\"Optimization history: \")\n",
|
556 |
| - "print(f\"Inputs = {res.x_hist}\")\n", |
557 |
| - "print(f\"Outputs = {res.y_hist}\")" |
| 508 | + "print(f\"Inputs = {res.x_doe}\")\n", |
| 509 | + "print(f\"Outputs = {res.y_doe}\")" |
558 | 510 | ]
|
559 | 511 | },
|
560 | 512 | {
|
|
585 | 537 | "Help on Egor in module builtins object:\n",
|
586 | 538 | "\n",
|
587 | 539 | "class Egor(object)\n",
|
588 |
| - " | Egor(xspecs, n_cstr=0, cstr_tol=None, n_start=20, n_doe=0, doe=None, regr_spec=Ellipsis, corr_spec=Ellipsis, infill_strategy=Ellipsis, q_points=1, par_infill_strategy=Ellipsis, infill_optimizer=Ellipsis, kpls_dim=None, trego=False, n_clusters=1, n_optmod=1, target=Ellipsis, outdir=None, hot_start=False, seed=None)\n", |
| 540 | + " | Egor(xspecs, n_cstr=0, cstr_tol=None, n_start=20, n_doe=0, doe=None, regr_spec=Ellipsis, corr_spec=Ellipsis, infill_strategy=Ellipsis, q_points=1, par_infill_strategy=Ellipsis, infill_optimizer=Ellipsis, kpls_dim=None, trego=False, n_clusters=1, n_optmod=1, target=Ellipsis, outdir=None, warm_start=False, seed=None)\n", |
589 | 541 | " | \n",
|
590 | 542 | " | Optimizer constructor\n",
|
591 | 543 | " | \n",
|
|
681 | 633 | " | Known optimum used as stopping criterion.\n",
|
682 | 634 | " | \n",
|
683 | 635 | " | outdir (String)\n",
|
684 |
| - " | Directory to write optimization history and used as search path for hot start doe\n", |
| 636 | + " | Directory to write optimization history and used as search path for warm start doe\n", |
685 | 637 | " | \n",
|
686 |
| - " | hot_start (bool)\n", |
| 638 | + " | warm_start (bool)\n", |
687 | 639 | " | Start by loading initial doe from <outdir> directory\n",
|
688 | 640 | " | \n",
|
689 | 641 | " | seed (int >= 0)\n",
|
|
0 commit comments