-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathclasses.html
723 lines (689 loc) · 55 KB
/
classes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="Description" content="scikit-optimize: machine learning in Python">
<title>API Reference — scikit-optimize 0.9.0 documentation</title>
<link rel="canonical" href="https://scikit-optimize.github.io/modules/classes.html" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="stylesheet" href="../_static/css/vendor/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/sg_gallery.css" type="text/css" />
<link rel="stylesheet" href="../_static/sg_gallery-binder.css" type="text/css" />
<link rel="stylesheet" href="../_static/sg_gallery-dataframe.css" type="text/css" />
<link rel="stylesheet" href="../_static/sg_gallery-rendered-html.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
</head>
<body>
<nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0">
<div class="container-fluid sk-docs-container px-0">
<a class="navbar-brand py-0" href="../index.html">
<img
class="sk-brand-img"
src="../_static/logo.png"
alt="logo"/>
</a>
<button
id="sk-navbar-toggler"
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="sk-nav-link nav-link" href="../install.html">Install</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link" href="../user_guide.html">User Guide</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link" href="#">API</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link" href="../auto_examples/index.html">Examples</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../getting_started.html">Getting Started</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../development.html">Development</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://github.com/scikit-optimize/scikit-optimize">GitHub</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-optimize.github.io/dev/versions.html">Other Versions</a>
</li>
<li class="nav-item dropdown nav-more-item-dropdown">
<a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="sk-nav-dropdown-item dropdown-item" href="../getting_started.html">Getting Started</a>
<a class="sk-nav-dropdown-item dropdown-item" href="../development.html">Development</a>
<a class="sk-nav-dropdown-item dropdown-item" href="https://github.com/scikit-optimize/scikit-optimize">GitHub</a>
<a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-optimize.github.io/dev/versions.html">Other Versions</a>
</div>
</li>
</ul>
<div id="searchbox" role="search">
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" />
<input class="sk-search-text-btn" type="submit" value="Go" />
</form>
</div>
</div>
</div>
</div>
</nav>
<div class="d-flex" id="sk-doc-wrapper">
<input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox">
<label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label>
<div id="sk-sidebar-wrapper" class="border-right">
<div class="sk-sidebar-toc-wrapper">
<div class="sk-sidebar-toc-logo">
<a href="../index.html">
<img
class="sk-brand-img"
src="../_static/logo.png"
alt="logo"/>
</a>
</div>
<div class="btn-group w-100 mb-2" role="group" aria-label="rellinks">
<a href="../auto_examples/plots/partial-dependence-plot-2D.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Partial Dependence Plots 2D">Prev</a>
<a href="#" role="button" class="btn sk-btn-rellink disabled py-1">Up</a>
<a href="generated/skopt.BayesSearchCV.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="skopt.BayesSearchCV">Next</a>
</div>
<div class="alert alert-danger p-1 mb-2" role="alert">
<p class="text-center mb-0">
<strong>scikit-optimize 0.9.0</strong><br/>
<a href="https://scikit-optimize.github.io/dev/versions.html">Other versions</a>
</p>
</div>
<div class="sk-sidebar-toc">
<ul>
<li><a class="reference internal" href="#">API Reference</a><ul>
<li><a class="reference internal" href="#skopt-module"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt</span></code>: module</a><ul>
<li><a class="reference internal" href="#base-classes">Base classes</a></li>
<li><a class="reference internal" href="#functions">Functions</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-skopt.acquisition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.acquisition</span></code>: Acquisition</a></li>
<li><a class="reference internal" href="#module-skopt.benchmarks"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.benchmarks</span></code>: A collection of benchmark problems.</a><ul>
<li><a class="reference internal" href="#id1">Functions</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-skopt.callbacks"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.callbacks</span></code>: Callbacks</a></li>
<li><a class="reference internal" href="#module-skopt.learning"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.learning</span></code>: Machine learning extensions for model-based optimization.</a></li>
<li><a class="reference internal" href="#module-skopt.optimizer"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.optimizer</span></code>: Optimizer</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#module-skopt.plots"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.plots</span></code>: Plotting functions.</a></li>
<li><a class="reference internal" href="#module-skopt.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.utils</span></code>: Utils functions.</a></li>
<li><a class="reference internal" href="#module-skopt.sampler"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.sampler</span></code>: Samplers</a></li>
<li><a class="reference internal" href="#module-skopt.space.space"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.space.space</span></code>: Space</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#module-skopt.space.transformers"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.space.transformers</span></code>: transformers</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div id="sk-page-content-wrapper">
<div class="sk-page-content container-fluid body px-md-3" role="main">
<section id="api-reference">
<span id="api-ref"></span><h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1>
<p>Scikit-Optimize, or skopt, is a simple and efficient library to minimize (very) expensive and noisy black-box functions. It implements several methods for sequential model-based optimization. skopt is reusable in many contexts and accessible.</p>
<section id="skopt-module">
<h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt</span></code>: module<a class="headerlink" href="#skopt-module" title="Permalink to this headline">¶</a></h2>
<section id="base-classes">
<h3>Base classes<a class="headerlink" href="#base-classes" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.BayesSearchCV.html#skopt.BayesSearchCV" title="skopt.BayesSearchCV"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BayesSearchCV</span></code></a>(estimator, search_spaces[, ...])</p></td>
<td><p>Bayesian optimization over hyper parameters.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.Optimizer.html#skopt.Optimizer" title="skopt.Optimizer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Optimizer</span></code></a>(dimensions[, base_estimator, ...])</p></td>
<td><p>Run bayesian optimisation loop.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.Space.html#skopt.Space" title="skopt.Space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Space</span></code></a>(dimensions)</p></td>
<td><p>Initialize a search space from given specifications.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="functions">
<h3>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.dummy_minimize.html#skopt.dummy_minimize" title="skopt.dummy_minimize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dummy_minimize</span></code></a>(func, dimensions[, n_calls, ...])</p></td>
<td><p>Random search by uniform sampling within the given bounds.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.dump.html#skopt.dump" title="skopt.dump"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dump</span></code></a>(res, filename[, store_objective])</p></td>
<td><p>Store an skopt optimization result into a file.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.expected_minimum.html#skopt.expected_minimum" title="skopt.expected_minimum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">expected_minimum</span></code></a>(res[, n_random_starts, ...])</p></td>
<td><p>Compute the minimum over the predictions of the last surrogate model.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.expected_minimum_random_sampling.html#skopt.expected_minimum_random_sampling" title="skopt.expected_minimum_random_sampling"><code class="xref py py-obj docutils literal notranslate"><span class="pre">expected_minimum_random_sampling</span></code></a>(res[, ...])</p></td>
<td><p>Minimum search by doing naive random sampling, Returns the parameters that gave the minimum function value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.forest_minimize.html#skopt.forest_minimize" title="skopt.forest_minimize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">forest_minimize</span></code></a>(func, dimensions[, ...])</p></td>
<td><p>Sequential optimisation using decision trees.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.gbrt_minimize.html#skopt.gbrt_minimize" title="skopt.gbrt_minimize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">gbrt_minimize</span></code></a>(func, dimensions[, ...])</p></td>
<td><p>Sequential optimization using gradient boosted trees.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.gp_minimize.html#skopt.gp_minimize" title="skopt.gp_minimize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">gp_minimize</span></code></a>(func, dimensions[, ...])</p></td>
<td><p>Bayesian optimization using Gaussian Processes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.load.html#skopt.load" title="skopt.load"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load</span></code></a>(filename, **kwargs)</p></td>
<td><p>Reconstruct a skopt optimization result from a file persisted with skopt.dump.</p></td>
</tr>
</tbody>
</table>
</section>
</section>
<section id="module-skopt.acquisition">
<span id="skopt-acquisition-acquisition"></span><span id="acquisition-ref"></span><h2><a class="reference internal" href="#module-skopt.acquisition" title="skopt.acquisition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.acquisition</span></code></a>: Acquisition<a class="headerlink" href="#module-skopt.acquisition" title="Permalink to this headline">¶</a></h2>
<p><strong>User guide:</strong> See the <a class="reference internal" href="acquisition.html#acquisition"><span class="std std-ref">Acquisition</span></a> section for further details.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.acquisition.gaussian_acquisition_1D.html#skopt.acquisition.gaussian_acquisition_1D" title="skopt.acquisition.gaussian_acquisition_1D"><code class="xref py py-obj docutils literal notranslate"><span class="pre">acquisition.gaussian_acquisition_1D</span></code></a>(X, model)</p></td>
<td><p>A wrapper around the acquisition function that is called by fmin_l_bfgs_b.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.acquisition.gaussian_ei.html#skopt.acquisition.gaussian_ei" title="skopt.acquisition.gaussian_ei"><code class="xref py py-obj docutils literal notranslate"><span class="pre">acquisition.gaussian_ei</span></code></a>(X, model[, y_opt, ...])</p></td>
<td><p>Use the expected improvement to calculate the acquisition values.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.acquisition.gaussian_lcb.html#skopt.acquisition.gaussian_lcb" title="skopt.acquisition.gaussian_lcb"><code class="xref py py-obj docutils literal notranslate"><span class="pre">acquisition.gaussian_lcb</span></code></a>(X, model[, kappa, ...])</p></td>
<td><p>Use the lower confidence bound to estimate the acquisition values.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.acquisition.gaussian_pi.html#skopt.acquisition.gaussian_pi" title="skopt.acquisition.gaussian_pi"><code class="xref py py-obj docutils literal notranslate"><span class="pre">acquisition.gaussian_pi</span></code></a>(X, model[, y_opt, ...])</p></td>
<td><p>Use the probability of improvement to calculate the acquisition values.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="module-skopt.benchmarks">
<span id="skopt-benchmarks-a-collection-of-benchmark-problems"></span><span id="benchmarks-ref"></span><h2><a class="reference internal" href="#module-skopt.benchmarks" title="skopt.benchmarks"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.benchmarks</span></code></a>: A collection of benchmark problems.<a class="headerlink" href="#module-skopt.benchmarks" title="Permalink to this headline">¶</a></h2>
<p>A collection of benchmark problems.</p>
<p><strong>User guide:</strong> See the <a class="reference internal" href="benchmarks.html#benchmarks"><span class="std std-ref">Benchmarks</span></a> section for
further details.</p>
<section id="id1">
<h3>Functions<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.benchmarks.bench1.html#skopt.benchmarks.bench1" title="skopt.benchmarks.bench1"><code class="xref py py-obj docutils literal notranslate"><span class="pre">benchmarks.bench1</span></code></a>(x)</p></td>
<td><p>A benchmark function for test purposes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.benchmarks.bench1_with_time.html#skopt.benchmarks.bench1_with_time" title="skopt.benchmarks.bench1_with_time"><code class="xref py py-obj docutils literal notranslate"><span class="pre">benchmarks.bench1_with_time</span></code></a>(x)</p></td>
<td><p>Same as bench1 but returns the computation time (constant).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.benchmarks.bench2.html#skopt.benchmarks.bench2" title="skopt.benchmarks.bench2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">benchmarks.bench2</span></code></a>(x)</p></td>
<td><p>A benchmark function for test purposes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.benchmarks.bench3.html#skopt.benchmarks.bench3" title="skopt.benchmarks.bench3"><code class="xref py py-obj docutils literal notranslate"><span class="pre">benchmarks.bench3</span></code></a>(x)</p></td>
<td><p>A benchmark function for test purposes.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.benchmarks.bench4.html#skopt.benchmarks.bench4" title="skopt.benchmarks.bench4"><code class="xref py py-obj docutils literal notranslate"><span class="pre">benchmarks.bench4</span></code></a>(x)</p></td>
<td><p>A benchmark function for test purposes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.benchmarks.bench5.html#skopt.benchmarks.bench5" title="skopt.benchmarks.bench5"><code class="xref py py-obj docutils literal notranslate"><span class="pre">benchmarks.bench5</span></code></a>(x)</p></td>
<td><p>A benchmark function for test purposes.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.benchmarks.branin.html#skopt.benchmarks.branin" title="skopt.benchmarks.branin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">benchmarks.branin</span></code></a>(x[, a, b, c, r, s, t])</p></td>
<td><p>Branin-Hoo function is defined on the square <span class="math notranslate nohighlight">\(x1 \in [-5, 10], x2 \in [0, 15]\)</span>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.benchmarks.hart6.html#skopt.benchmarks.hart6" title="skopt.benchmarks.hart6"><code class="xref py py-obj docutils literal notranslate"><span class="pre">benchmarks.hart6</span></code></a>(x[, alpha, P, A])</p></td>
<td><p>The six dimensional Hartmann function is defined on the unit hypercube.</p></td>
</tr>
</tbody>
</table>
</section>
</section>
<section id="module-skopt.callbacks">
<span id="skopt-callbacks-callbacks"></span><span id="callbacks-ref"></span><h2><a class="reference internal" href="#module-skopt.callbacks" title="skopt.callbacks"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.callbacks</span></code></a>: Callbacks<a class="headerlink" href="#module-skopt.callbacks" title="Permalink to this headline">¶</a></h2>
<p>Monitor and influence the optimization procedure via callbacks.</p>
<p>Callbacks are callables which are invoked after each iteration of the optimizer
and are passed the results “so far”. Callbacks can monitor progress, or stop
the optimization early by returning <code class="docutils literal notranslate"><span class="pre">True</span></code>.</p>
<p><strong>User guide:</strong> See the <a class="reference internal" href="callbacks.html#callbacks"><span class="std std-ref">Callbacks</span></a> section for further
details.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.callbacks.CheckpointSaver.html#skopt.callbacks.CheckpointSaver" title="skopt.callbacks.CheckpointSaver"><code class="xref py py-obj docutils literal notranslate"><span class="pre">callbacks.CheckpointSaver</span></code></a>(checkpoint_path, ...)</p></td>
<td><p>Save current state after each iteration with <a class="reference internal" href="generated/skopt.dump.html#skopt.dump" title="skopt.dump"><code class="xref py py-class docutils literal notranslate"><span class="pre">skopt.dump</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.callbacks.DeadlineStopper.html#skopt.callbacks.DeadlineStopper" title="skopt.callbacks.DeadlineStopper"><code class="xref py py-obj docutils literal notranslate"><span class="pre">callbacks.DeadlineStopper</span></code></a>(total_time)</p></td>
<td><p>Stop the optimization before running out of a fixed budget of time.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.callbacks.DeltaXStopper.html#skopt.callbacks.DeltaXStopper" title="skopt.callbacks.DeltaXStopper"><code class="xref py py-obj docutils literal notranslate"><span class="pre">callbacks.DeltaXStopper</span></code></a>(delta)</p></td>
<td><p>Stop the optimization when <code class="docutils literal notranslate"><span class="pre">|x1</span> <span class="pre">-</span> <span class="pre">x2|</span> <span class="pre"><</span> <span class="pre">delta</span></code></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.callbacks.DeltaYStopper.html#skopt.callbacks.DeltaYStopper" title="skopt.callbacks.DeltaYStopper"><code class="xref py py-obj docutils literal notranslate"><span class="pre">callbacks.DeltaYStopper</span></code></a>(delta[, n_best])</p></td>
<td><p>Stop the optimization if the <code class="docutils literal notranslate"><span class="pre">n_best</span></code> minima are within <code class="docutils literal notranslate"><span class="pre">delta</span></code></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.callbacks.EarlyStopper.html#skopt.callbacks.EarlyStopper" title="skopt.callbacks.EarlyStopper"><code class="xref py py-obj docutils literal notranslate"><span class="pre">callbacks.EarlyStopper</span></code></a>()</p></td>
<td><p>Decide to continue or not given the results so far.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.callbacks.TimerCallback.html#skopt.callbacks.TimerCallback" title="skopt.callbacks.TimerCallback"><code class="xref py py-obj docutils literal notranslate"><span class="pre">callbacks.TimerCallback</span></code></a>()</p></td>
<td><p>Log the elapsed time between each iteration of the minimization loop.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.callbacks.VerboseCallback.html#skopt.callbacks.VerboseCallback" title="skopt.callbacks.VerboseCallback"><code class="xref py py-obj docutils literal notranslate"><span class="pre">callbacks.VerboseCallback</span></code></a>(n_total[, n_init, ...])</p></td>
<td><p>Callback to control the verbosity.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="module-skopt.learning">
<span id="skopt-learning-machine-learning-extensions-for-model-based-optimization"></span><span id="learning-ref"></span><h2><a class="reference internal" href="#module-skopt.learning" title="skopt.learning"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.learning</span></code></a>: Machine learning extensions for model-based optimization.<a class="headerlink" href="#module-skopt.learning" title="Permalink to this headline">¶</a></h2>
<p>Machine learning extensions for model-based optimization.</p>
<p><strong>User guide:</strong> See the <a class="reference internal" href="learning.html#learning"><span class="std std-ref">Learning</span></a> section for further details.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.learning.ExtraTreesRegressor.html#skopt.learning.ExtraTreesRegressor" title="skopt.learning.ExtraTreesRegressor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">learning.ExtraTreesRegressor</span></code></a>([n_estimators, ...])</p></td>
<td><p>ExtraTreesRegressor that supports conditional standard deviation.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.learning.GaussianProcessRegressor.html#skopt.learning.GaussianProcessRegressor" title="skopt.learning.GaussianProcessRegressor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">learning.GaussianProcessRegressor</span></code></a>([kernel, ...])</p></td>
<td><p>GaussianProcessRegressor that allows noise tunability.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.learning.GradientBoostingQuantileRegressor.html#skopt.learning.GradientBoostingQuantileRegressor" title="skopt.learning.GradientBoostingQuantileRegressor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">learning.GradientBoostingQuantileRegressor</span></code></a>([...])</p></td>
<td><p>Predict several quantiles with one estimator.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.learning.RandomForestRegressor.html#skopt.learning.RandomForestRegressor" title="skopt.learning.RandomForestRegressor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">learning.RandomForestRegressor</span></code></a>([...])</p></td>
<td><p>RandomForestRegressor that supports conditional std computation.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="module-skopt.optimizer">
<span id="skopt-optimizer-optimizer"></span><span id="optimizer-ref"></span><h2><a class="reference internal" href="#module-skopt.optimizer" title="skopt.optimizer"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.optimizer</span></code></a>: Optimizer<a class="headerlink" href="#module-skopt.optimizer" title="Permalink to this headline">¶</a></h2>
<p><strong>User guide:</strong> See the <a class="reference internal" href="optimizer.html#optimizer"><span class="std std-ref">Optimizer, an ask-and-tell interface</span></a> section for further details.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.optimizer.Optimizer.html#skopt.optimizer.Optimizer" title="skopt.optimizer.Optimizer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">optimizer.Optimizer</span></code></a>(dimensions[, ...])</p></td>
<td><p>Run bayesian optimisation loop.</p></td>
</tr>
</tbody>
</table>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.optimizer.base_minimize.html#skopt.optimizer.base_minimize" title="skopt.optimizer.base_minimize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">optimizer.base_minimize</span></code></a>(func, dimensions, ...)</p></td>
<td><p>Base optimizer class</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.optimizer.dummy_minimize.html#skopt.optimizer.dummy_minimize" title="skopt.optimizer.dummy_minimize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">optimizer.dummy_minimize</span></code></a>(func, dimensions[, ...])</p></td>
<td><p>Random search by uniform sampling within the given bounds.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.optimizer.forest_minimize.html#skopt.optimizer.forest_minimize" title="skopt.optimizer.forest_minimize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">optimizer.forest_minimize</span></code></a>(func, dimensions)</p></td>
<td><p>Sequential optimisation using decision trees.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.optimizer.gbrt_minimize.html#skopt.optimizer.gbrt_minimize" title="skopt.optimizer.gbrt_minimize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">optimizer.gbrt_minimize</span></code></a>(func, dimensions[, ...])</p></td>
<td><p>Sequential optimization using gradient boosted trees.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.optimizer.gp_minimize.html#skopt.optimizer.gp_minimize" title="skopt.optimizer.gp_minimize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">optimizer.gp_minimize</span></code></a>(func, dimensions[, ...])</p></td>
<td><p>Bayesian optimization using Gaussian Processes.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="module-skopt.plots">
<span id="skopt-plots-plotting-functions"></span><span id="plots-ref"></span><h2><a class="reference internal" href="#module-skopt.plots" title="skopt.plots"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.plots</span></code></a>: Plotting functions.<a class="headerlink" href="#module-skopt.plots" title="Permalink to this headline">¶</a></h2>
<p>Plotting functions.</p>
<p><strong>User guide:</strong> See the <a class="reference internal" href="plots.html#plots"><span class="std std-ref">Plotting tools</span></a> section for further details.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.plots.partial_dependence.html#skopt.plots.partial_dependence" title="skopt.plots.partial_dependence"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.partial_dependence</span></code></a>(space, model, i[, ...])</p></td>
<td><p>Calculate the partial dependence for dimensions <code class="docutils literal notranslate"><span class="pre">i</span></code> and <code class="docutils literal notranslate"><span class="pre">j</span></code> with respect to the objective value, as approximated by <code class="docutils literal notranslate"><span class="pre">model</span></code>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.plots.partial_dependence_1D.html#skopt.plots.partial_dependence_1D" title="skopt.plots.partial_dependence_1D"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.partial_dependence_1D</span></code></a>(space, model, i, ...)</p></td>
<td><p>Calculate the partial dependence for a single dimension.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.plots.partial_dependence_2D.html#skopt.plots.partial_dependence_2D" title="skopt.plots.partial_dependence_2D"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.partial_dependence_2D</span></code></a>(space, model, i, ...)</p></td>
<td><p>Calculate the partial dependence for two dimensions in the search-space.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.plots.plot_convergence.html#skopt.plots.plot_convergence" title="skopt.plots.plot_convergence"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.plot_convergence</span></code></a>(*args, **kwargs)</p></td>
<td><p>Plot one or several convergence traces.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.plots.plot_evaluations.html#skopt.plots.plot_evaluations" title="skopt.plots.plot_evaluations"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.plot_evaluations</span></code></a>(result[, bins, ...])</p></td>
<td><p>Visualize the order in which points were sampled during optimization.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.plots.plot_gaussian_process.html#skopt.plots.plot_gaussian_process" title="skopt.plots.plot_gaussian_process"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.plot_gaussian_process</span></code></a>(res, **kwargs)</p></td>
<td><p>Plots the optimization results and the gaussian process for 1-D objective functions.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.plots.plot_objective.html#skopt.plots.plot_objective" title="skopt.plots.plot_objective"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.plot_objective</span></code></a>(result[, levels, ...])</p></td>
<td><p>Plot a 2-d matrix with so-called Partial Dependence plots of the objective function.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.plots.plot_objective_2D.html#skopt.plots.plot_objective_2D" title="skopt.plots.plot_objective_2D"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.plot_objective_2D</span></code></a>(result, ...[, ...])</p></td>
<td><p>Create and return a Matplotlib figure and axes with a landscape contour-plot of the last fitted model of the search-space, overlaid with all the samples from the optimization results, for the two given dimensions of the search-space.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.plots.plot_histogram.html#skopt.plots.plot_histogram" title="skopt.plots.plot_histogram"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.plot_histogram</span></code></a>(result, ...[, bins, ...])</p></td>
<td><p>Create and return a Matplotlib figure with a histogram of the samples from the optimization results, for a given dimension of the search-space.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.plots.plot_regret.html#skopt.plots.plot_regret" title="skopt.plots.plot_regret"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plots.plot_regret</span></code></a>(*args, **kwargs)</p></td>
<td><p>Plot one or several cumulative regret traces.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="module-skopt.utils">
<span id="skopt-utils-utils-functions"></span><span id="utils-ref"></span><h2><a class="reference internal" href="#module-skopt.utils" title="skopt.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.utils</span></code></a>: Utils functions.<a class="headerlink" href="#module-skopt.utils" title="Permalink to this headline">¶</a></h2>
<p><strong>User guide:</strong> See the <a class="reference internal" href="utils.html#utils"><span class="std std-ref">Utility functions</span></a> section for further details.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.utils.cook_estimator.html#skopt.utils.cook_estimator" title="skopt.utils.cook_estimator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.cook_estimator</span></code></a>(base_estimator[, space])</p></td>
<td><p>Cook a default estimator.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.utils.cook_initial_point_generator.html#skopt.utils.cook_initial_point_generator" title="skopt.utils.cook_initial_point_generator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.cook_initial_point_generator</span></code></a>(...)</p></td>
<td><p>Cook a default initial point generator.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.utils.dimensions_aslist.html#skopt.utils.dimensions_aslist" title="skopt.utils.dimensions_aslist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.dimensions_aslist</span></code></a>(search_space)</p></td>
<td><p>Convert a dict representation of a search space into a list of dimensions, ordered by sorted(search_space.keys()).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.utils.expected_minimum.html#skopt.utils.expected_minimum" title="skopt.utils.expected_minimum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.expected_minimum</span></code></a>(res[, ...])</p></td>
<td><p>Compute the minimum over the predictions of the last surrogate model.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.utils.expected_minimum_random_sampling.html#skopt.utils.expected_minimum_random_sampling" title="skopt.utils.expected_minimum_random_sampling"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.expected_minimum_random_sampling</span></code></a>(res)</p></td>
<td><p>Minimum search by doing naive random sampling, Returns the parameters that gave the minimum function value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.utils.dump.html#skopt.utils.dump" title="skopt.utils.dump"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.dump</span></code></a>(res, filename[, store_objective])</p></td>
<td><p>Store an skopt optimization result into a file.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.utils.load.html#skopt.utils.load" title="skopt.utils.load"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.load</span></code></a>(filename, **kwargs)</p></td>
<td><p>Reconstruct a skopt optimization result from a file persisted with skopt.dump.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.utils.point_asdict.html#skopt.utils.point_asdict" title="skopt.utils.point_asdict"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.point_asdict</span></code></a>(search_space, point_as_list)</p></td>
<td><p>Convert the list representation of a point from a search space to the dictionary representation, where keys are dimension names and values are corresponding to the values of dimensions in the list.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.utils.point_aslist.html#skopt.utils.point_aslist" title="skopt.utils.point_aslist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.point_aslist</span></code></a>(search_space, point_as_dict)</p></td>
<td><p>Convert a dictionary representation of a point from a search space to the list representation.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.utils.use_named_args.html#skopt.utils.use_named_args" title="skopt.utils.use_named_args"><code class="xref py py-obj docutils literal notranslate"><span class="pre">utils.use_named_args</span></code></a>(dimensions)</p></td>
<td><p>Wrapper / decorator for an objective function that uses named arguments to make it compatible with optimizers that use a single list of parameters.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="module-skopt.sampler">
<span id="skopt-sampler-samplers"></span><span id="sampler-ref"></span><h2><a class="reference internal" href="#module-skopt.sampler" title="skopt.sampler"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.sampler</span></code></a>: Samplers<a class="headerlink" href="#module-skopt.sampler" title="Permalink to this headline">¶</a></h2>
<p>Utilities for generating initial sequences</p>
<p><strong>User guide:</strong> See the <a class="reference internal" href="sampler.html#sampler"><span class="std std-ref">Sampling methods</span></a> section for further details.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.sampler.Lhs.html#skopt.sampler.Lhs" title="skopt.sampler.Lhs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sampler.Lhs</span></code></a>([lhs_type, criterion, iterations])</p></td>
<td><p>Latin hypercube sampling</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.sampler.Sobol.html#skopt.sampler.Sobol" title="skopt.sampler.Sobol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sampler.Sobol</span></code></a>([skip, randomize])</p></td>
<td><p>Generates a new quasirandom Sobol' vector with each call.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.sampler.Halton.html#skopt.sampler.Halton" title="skopt.sampler.Halton"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sampler.Halton</span></code></a>([min_skip, max_skip, primes])</p></td>
<td><p>Creates <code class="docutils literal notranslate"><span class="pre">Halton</span></code> sequence samples.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.sampler.Hammersly.html#skopt.sampler.Hammersly" title="skopt.sampler.Hammersly"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sampler.Hammersly</span></code></a>([min_skip, max_skip, primes])</p></td>
<td><p>Creates <code class="docutils literal notranslate"><span class="pre">Hammersley</span></code> sequence samples.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="module-skopt.space.space">
<span id="skopt-space-space-space"></span><span id="space-ref"></span><h2><a class="reference internal" href="#module-skopt.space.space" title="skopt.space.space"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.space.space</span></code></a>: Space<a class="headerlink" href="#module-skopt.space.space" title="Permalink to this headline">¶</a></h2>
<p><strong>User guide:</strong> See the <a class="reference internal" href="space.html#space"><span class="std std-ref">Space</span></a> section for further details.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.space.space.Categorical.html#skopt.space.space.Categorical" title="skopt.space.space.Categorical"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.space.Categorical</span></code></a>(categories[, prior, ...])</p></td>
<td><p>Search space dimension that can take on categorical values.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.space.space.Dimension.html#skopt.space.space.Dimension" title="skopt.space.space.Dimension"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.space.Dimension</span></code></a>()</p></td>
<td><p>Base class for search space dimensions.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.space.space.Integer.html#skopt.space.space.Integer" title="skopt.space.space.Integer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.space.Integer</span></code></a>(low, high[, prior, ...])</p></td>
<td><p>Search space dimension that can take on integer values.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.space.space.Real.html#skopt.space.space.Real" title="skopt.space.space.Real"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.space.Real</span></code></a>(low, high[, prior, base, ...])</p></td>
<td><p>Search space dimension that can take on any real value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.space.space.Space.html#skopt.space.space.Space" title="skopt.space.space.Space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.space.Space</span></code></a>(dimensions)</p></td>
<td><p>Initialize a search space from given specifications.</p></td>
</tr>
</tbody>
</table>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.space.space.check_dimension.html#skopt.space.space.check_dimension" title="skopt.space.space.check_dimension"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.space.check_dimension</span></code></a>(dimension[, ...])</p></td>
<td><p>Turn a provided dimension description into a dimension object.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="module-skopt.space.transformers">
<span id="skopt-space-transformers-transformers"></span><span id="transformers-ref"></span><h2><a class="reference internal" href="#module-skopt.space.transformers" title="skopt.space.transformers"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.space.transformers</span></code></a>: transformers<a class="headerlink" href="#module-skopt.space.transformers" title="Permalink to this headline">¶</a></h2>
<p><strong>User guide:</strong> See the <a class="reference internal" href="transformers.html#transformers"><span class="std std-ref">Transformers</span></a> section for further details.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.space.transformers.CategoricalEncoder.html#skopt.space.transformers.CategoricalEncoder" title="skopt.space.transformers.CategoricalEncoder"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.transformers.CategoricalEncoder</span></code></a>()</p></td>
<td><p>OneHotEncoder that can handle categorical variables.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.space.transformers.Identity.html#skopt.space.transformers.Identity" title="skopt.space.transformers.Identity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.transformers.Identity</span></code></a>()</p></td>
<td><p>Identity transform.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.space.transformers.LogN.html#skopt.space.transformers.LogN" title="skopt.space.transformers.LogN"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.transformers.LogN</span></code></a>(base)</p></td>
<td><p>Base N logarithm transform.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.space.transformers.Normalize.html#skopt.space.transformers.Normalize" title="skopt.space.transformers.Normalize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.transformers.Normalize</span></code></a>(low, high[, is_int])</p></td>
<td><p>Scales each dimension into the interval [0, 1].</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.space.transformers.Pipeline.html#skopt.space.transformers.Pipeline" title="skopt.space.transformers.Pipeline"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.transformers.Pipeline</span></code></a>(transformers)</p></td>
<td><p>A lightweight pipeline to chain transformers.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.space.transformers.Transformer.html#skopt.space.transformers.Transformer" title="skopt.space.transformers.Transformer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.transformers.Transformer</span></code></a>()</p></td>
<td><p>Base class for all 1-D transformers.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/skopt.space.transformers.LabelEncoder.html#skopt.space.transformers.LabelEncoder" title="skopt.space.transformers.LabelEncoder"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.transformers.LabelEncoder</span></code></a>([X])</p></td>
<td><p>LabelEncoder that can handle categorical variables.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/skopt.space.transformers.StringEncoder.html#skopt.space.transformers.StringEncoder" title="skopt.space.transformers.StringEncoder"><code class="xref py py-obj docutils literal notranslate"><span class="pre">space.transformers.StringEncoder</span></code></a>([dtype])</p></td>
<td><p>StringEncoder transform.</p></td>
</tr>
</tbody>
</table>
</section>
</section>
</div>
<div class="container">
<footer class="sk-content-footer">
© 2017 - 2020, scikit-optimize contributors (BSD License).
<a href="../_sources/modules/classes.rst.txt" rel="nofollow">Show this page source</a>
</footer>
</div>
</div>
</div>
<script src="../_static/js/vendor/bootstrap.min.js"></script>
<script>
$(document).ready(function() {
/* Add a [>>>] button on the top-right corner of code sampler to hide
* the >>> and ... prompts and the output and thus make the code
* copyable. */
var div = $('.highlight-python .highlight,' +
'.highlight-python3 .highlight,' +
'.highlight-pycon .highlight,' +
'.highlight-default .highlight')
var pre = div.find('pre');
// get the styles from the current theme
pre.parent().parent().css('position', 'relative');
var hide_text = 'Hide prompts and outputs';
var show_text = 'Show prompts and outputs';
// create and add the button to all the code blocks that contain >>>
div.each(function(index) {
var jthis = $(this);
if (jthis.find('.gp').length > 0) {
var button = $('<span class="copybutton">>>></span>');
button.attr('title', hide_text);
button.data('hidden', 'false');
jthis.prepend(button);
}
// tracebacks (.gt) contain bare text elements that need to be
// wrapped in a span to work with .nextUntil() (see later)
jthis.find('pre:has(.gt)').contents().filter(function() {
return ((this.nodeType == 3) && (this.data.trim().length > 0));
}).wrap('<span>');
});
// define the behavior of the button when it's clicked
$('.copybutton').click(function(e){
e.preventDefault();
var button = $(this);
if (button.data('hidden') === 'false') {
// hide the code output
button.parent().find('.go, .gp, .gt').hide();
button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');
button.css('text-decoration', 'line-through');
button.attr('title', show_text);
button.data('hidden', 'true');
} else {
// show the code output
button.parent().find('.go, .gp, .gt').show();
button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');
button.css('text-decoration', 'none');
button.attr('title', hide_text);
button.data('hidden', 'false');
}
});
/*** Add permalink buttons next to glossary terms ***/
$('dl.glossary > dt[id]').append(function() {
return ('<a class="headerlink" href="#' +
this.getAttribute('id') +
'" title="Permalink to this term">¶</a>');
});
/*** Hide navbar when scrolling down ***/
// Returns true when headerlink target matches hash in url
(function() {
hashTargetOnTop = function() {
var hash = window.location.hash;
if ( hash.length < 2 ) { return false; }
var target = document.getElementById( hash.slice(1) );
if ( target === null ) { return false; }
var top = target.getBoundingClientRect().top;
return (top < 2) && (top > -2);
};
// Hide navbar on load if hash target is on top
var navBar = document.getElementById("navbar");
var navBarToggler = document.getElementById("sk-navbar-toggler");
var navBarHeightHidden = "-" + navBar.getBoundingClientRect().height + "px";
var $window = $(window);
hideNavBar = function() {
navBar.style.top = navBarHeightHidden;
};
showNavBar = function() {
navBar.style.top = "0";
}
if (hashTargetOnTop()) {
hideNavBar()
}
var prevScrollpos = window.pageYOffset;
hideOnScroll = function(lastScrollTop) {
if (($window.width() < 768) && (navBarToggler.getAttribute("aria-expanded") === 'true')) {
return;
}
if (lastScrollTop > 2 && (prevScrollpos <= lastScrollTop) || hashTargetOnTop()){
hideNavBar()
} else {
showNavBar()
}
prevScrollpos = lastScrollTop;
};
/*** high performance scroll event listener***/
var raf = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame;
var lastScrollTop = $window.scrollTop();
if (raf) {
loop();
}
function loop() {
var scrollTop = $window.scrollTop();
if (lastScrollTop === scrollTop) {
raf(loop);
return;
} else {
lastScrollTop = scrollTop;
hideOnScroll(lastScrollTop);
raf(loop);
}
}
})();
});
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<script src="https://scikit-optimize.github.io/versionwarning.js"></script>
</body>
</html>