... | ... |
@@ -51,9 +51,7 @@ |
51 | 51 |
{ |
52 | 52 |
"cell_type": "code", |
53 | 53 |
"execution_count": null, |
54 |
- "metadata": { |
|
55 |
- "collapsed": true |
|
56 |
- }, |
|
54 |
+ "metadata": {}, |
|
57 | 55 |
"outputs": [], |
58 | 56 |
"source": [ |
59 | 57 |
"import functools\n", |
... | ... |
@@ -81,9 +79,7 @@ |
81 | 79 |
{ |
82 | 80 |
"cell_type": "code", |
83 | 81 |
"execution_count": null, |
84 |
- "metadata": { |
|
85 |
- "collapsed": true |
|
86 |
- }, |
|
82 |
+ "metadata": {}, |
|
87 | 83 |
"outputs": [], |
88 | 84 |
"source": [ |
89 | 85 |
"learner = adaptive.learner.Learner1D(f, bounds=(-1.0, 1.0))" |
... | ... |
@@ -101,9 +97,7 @@ |
101 | 97 |
{ |
102 | 98 |
"cell_type": "code", |
103 | 99 |
"execution_count": null, |
104 |
- "metadata": { |
|
105 |
- "collapsed": true |
|
106 |
- }, |
|
100 |
+ "metadata": {}, |
|
107 | 101 |
"outputs": [], |
108 | 102 |
"source": [ |
109 | 103 |
"# The end condition is when the \"loss\" is less than 0.1. In the context of the\n", |
... | ... |
@@ -122,9 +116,7 @@ |
122 | 116 |
{ |
123 | 117 |
"cell_type": "code", |
124 | 118 |
"execution_count": null, |
125 |
- "metadata": { |
|
126 |
- "collapsed": true |
|
127 |
- }, |
|
119 |
+ "metadata": {}, |
|
128 | 120 |
"outputs": [], |
129 | 121 |
"source": [ |
130 | 122 |
"adaptive.live_plot(runner)" |
... | ... |
@@ -140,9 +132,7 @@ |
140 | 132 |
{ |
141 | 133 |
"cell_type": "code", |
142 | 134 |
"execution_count": null, |
143 |
- "metadata": { |
|
144 |
- "collapsed": true |
|
145 |
- }, |
|
135 |
+ "metadata": {}, |
|
146 | 136 |
"outputs": [], |
147 | 137 |
"source": [ |
148 | 138 |
"if not runner.task.done():\n", |
... | ... |
@@ -152,9 +142,7 @@ |
152 | 142 |
{ |
153 | 143 |
"cell_type": "code", |
154 | 144 |
"execution_count": null, |
155 |
- "metadata": { |
|
156 |
- "collapsed": true |
|
157 |
- }, |
|
145 |
+ "metadata": {}, |
|
158 | 146 |
"outputs": [], |
159 | 147 |
"source": [ |
160 | 148 |
"import numpy as np\n", |
... | ... |
@@ -187,9 +175,7 @@ |
187 | 175 |
{ |
188 | 176 |
"cell_type": "code", |
189 | 177 |
"execution_count": null, |
190 |
- "metadata": { |
|
191 |
- "collapsed": true |
|
192 |
- }, |
|
178 |
+ "metadata": {}, |
|
193 | 179 |
"outputs": [], |
194 | 180 |
"source": [ |
195 | 181 |
"def g(n):\n", |
... | ... |
@@ -207,9 +193,7 @@ |
207 | 193 |
{ |
208 | 194 |
"cell_type": "code", |
209 | 195 |
"execution_count": null, |
210 |
- "metadata": { |
|
211 |
- "scrolled": false |
|
212 |
- }, |
|
196 |
+ "metadata": {}, |
|
213 | 197 |
"outputs": [], |
214 | 198 |
"source": [ |
215 | 199 |
"learner = adaptive.AverageLearner(g, None, 0.03)\n", |
... | ... |
@@ -250,9 +234,7 @@ |
250 | 234 |
{ |
251 | 235 |
"cell_type": "code", |
252 | 236 |
"execution_count": null, |
253 |
- "metadata": { |
|
254 |
- "collapsed": true |
|
255 |
- }, |
|
237 |
+ "metadata": {}, |
|
256 | 238 |
"outputs": [], |
257 | 239 |
"source": [ |
258 | 240 |
"from concurrent.futures import ProcessPoolExecutor\n", |
... | ... |
@@ -274,9 +256,7 @@ |
274 | 256 |
{ |
275 | 257 |
"cell_type": "code", |
276 | 258 |
"execution_count": null, |
277 |
- "metadata": { |
|
278 |
- "collapsed": true |
|
279 |
- }, |
|
259 |
+ "metadata": {}, |
|
280 | 260 |
"outputs": [], |
281 | 261 |
"source": [ |
282 | 262 |
"import ipyparallel\n", |
... | ... |
@@ -323,9 +303,7 @@ |
323 | 303 |
{ |
324 | 304 |
"cell_type": "code", |
325 | 305 |
"execution_count": null, |
326 |
- "metadata": { |
|
327 |
- "collapsed": true |
|
328 |
- }, |
|
306 |
+ "metadata": {}, |
|
329 | 307 |
"outputs": [], |
330 | 308 |
"source": [ |
331 | 309 |
"learner = adaptive.learner.Learner1D(f, bounds=(-1.0, 1.0))\n", |
... | ... |
@@ -336,9 +314,7 @@ |
336 | 314 |
{ |
337 | 315 |
"cell_type": "code", |
338 | 316 |
"execution_count": null, |
339 |
- "metadata": { |
|
340 |
- "collapsed": true |
|
341 |
- }, |
|
317 |
+ "metadata": {}, |
|
342 | 318 |
"outputs": [], |
343 | 319 |
"source": [ |
344 | 320 |
"runner.task.cancel()" |
... | ... |
@@ -363,9 +339,7 @@ |
363 | 339 |
{ |
364 | 340 |
"cell_type": "code", |
365 | 341 |
"execution_count": null, |
366 |
- "metadata": { |
|
367 |
- "collapsed": true |
|
368 |
- }, |
|
342 |
+ "metadata": {}, |
|
369 | 343 |
"outputs": [], |
370 | 344 |
"source": [ |
371 | 345 |
"def will_raise(x):\n", |
... | ... |
@@ -394,9 +368,7 @@ |
394 | 368 |
{ |
395 | 369 |
"cell_type": "code", |
396 | 370 |
"execution_count": null, |
397 |
- "metadata": { |
|
398 |
- "collapsed": true |
|
399 |
- }, |
|
371 |
+ "metadata": {}, |
|
400 | 372 |
"outputs": [], |
401 | 373 |
"source": [ |
402 | 374 |
"runner.task.done()" |
... | ... |
@@ -412,10 +384,7 @@ |
412 | 384 |
{ |
413 | 385 |
"cell_type": "code", |
414 | 386 |
"execution_count": null, |
415 |
- "metadata": { |
|
416 |
- "collapsed": true, |
|
417 |
- "scrolled": false |
|
418 |
- }, |
|
387 |
+ "metadata": {}, |
|
419 | 388 |
"outputs": [], |
420 | 389 |
"source": [ |
421 | 390 |
"runner.task.result()" |