Built-in functionalities¤
Factory functions and implementations for built-in samplers, benchmark functions, and optimizers. These can be instantiated by name using the factory functions or imported directly from their submodules.
See also
- Guide: Built-in Defaults for a quick reference with tables and examples
- Tutorials: Benchmark Functions | Built-in Optimizers | Built-in Samplers
f3dasm.create_sampler(sampler: str | DictConfig, **parameters) -> Block
¤
Create a sampler block from one of the built-in samplers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sampler
|
str | DictConfig
|
Name of the built-in sampler. Accepted values (issue #289):
Can also be a Hydra |
required |
**parameters
|
Additional keyword arguments passed when initializing the sampler.
Only the keywords documented per-backend above are accepted; any
other keyword raises a |
required |
Returns:
| Type | Description |
|---|---|
Block
|
Block object of the sampler |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the built-in sampler name is not recognized. |
TypeError
|
If |
Source code in src/f3dasm/_src/samplers.py
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 | |
f3dasm.create_datagenerator(data_generator: str, output_names: str | Iterable[str], **parameters) -> DataGenerator
¤
Create a DataGenerator block from one of the built-in data generators.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_generator
|
str | DataGenerator
|
name of the built-in data generator. This can be a string with the name of the data generator, a Block object (this will just by-pass the function), or a function. |
required |
**parameters
|
Additional keyword arguments passed when initializing the data generator |
required |
Returns:
| Type | Description |
|---|---|
DataGenerator
|
DataGenerator object |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the built-in sampler data generator is not recognized. |
TypeError
|
If the given type is not recognized. |
Source code in src/f3dasm/_src/datageneration/datagenerator_factory.py
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 | |
f3dasm.create_optimizer(optimizer: str | DictConfig, **hyperparameters) -> Block
¤
Create an optimizer block from one of the built-in optimizers.
The returned block is always a single step of the optimizer's work, never a full loop:
-
For ask/tell optimizers (e.g.
"tpesampler") the block is the per-iteration update step and must be chained with a data generator and wrapped in a :class:LoopBlock::tpe = create_optimizer("tpesampler", output_name="y") step = (tpe >> f).loop(50) data = step.call(data)
-
For scipy optimizers (e.g.
"cg","lbfgsb","neldermead") the block is a one-shot optimizer that runs scipy's own inner loop on a single call; passmaxiterviahyperparameters, and do not wrap it in a :class:LoopBlock::step = create_optimizer( "cg", data_generator=f, output_name="y", input_name="x", maxiter=50, ) data = step.call(data)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
optimizer
|
str | DictConfig
|
Name of the built-in optimizer, or a Hydra |
required |
**hyperparameters
|
Forwarded to the underlying factory function. |
required |
Returns:
| Type | Description |
|---|---|
Block
|
Configured optimizer block. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the built-in optimizer name is not recognized. |
TypeError
|
If |
Source code in src/f3dasm/_src/optimization/optimizer_factory.py
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 | |
Built-in samplers¤
f3dasm.design.grid(stepsize_continuous_parameters: Optional[dict[str, float] | float] = None, **kwargs) -> Block
¤
Create a Grid sampler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stepsize_continuous_parameters
|
dict[str, float] or float
|
Step size for continuous parameters. If a single float, the same step size is used for all continuous parameters. If a dict, maps parameter names to individual step sizes. |
None
|
**kwargs
|
dict
|
Additional parameters for the sampler. |
required |
Returns:
| Type | Description |
|---|---|
Block
|
A Block instance of a grid sampler. |
Source code in src/f3dasm/_src/samplers.py
1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 | |
f3dasm.design.random(seed: Optional[int] = None, **kwargs) -> Block
¤
Create a RandomUniform sampler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
Optional[int]
|
The random seed, by default None |
None
|
**kwargs
|
dict
|
Additional parameters for the sampler. |
required |
Returns:
| Type | Description |
|---|---|
Block
|
An Block instance of a random uniform sampler. |
Source code in src/f3dasm/_src/samplers.py
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | |
f3dasm.design.latin(seed: Optional[int] = None, **kwargs) -> Block
¤
Create a Latin Hypercube sampler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
Optional[int]
|
The random seed, by default None |
None
|
**kwargs
|
dict
|
Additional parameters for the sampler. |
required |
Returns:
| Type | Description |
|---|---|
Block
|
An Block instance of a latin hypercube sampler. |
Source code in src/f3dasm/_src/samplers.py
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | |
f3dasm.design.sobol(seed: Optional[int] = None, **kwargs) -> Block
¤
Create a Sobol sampler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
Optional[int]
|
The random seed, by default None |
None
|
**kwargs
|
dict
|
Additional parameters for the sampler. |
required |
Returns:
| Type | Description |
|---|---|
Block
|
A Block instance of a sobol sequence sampler. |
Source code in src/f3dasm/_src/samplers.py
739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | |
Built-in datagenerators¤
f3dasm.datageneration.functions.ackley(x: ndarray, a: float = 20.0, b: float = 0.2, c: float = 6.283185307179586)
¤
Ackley function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
a
|
float
|
Parameter a, by default 20 |
20.0
|
b
|
float
|
Parameter b, by default 0.2 |
0.2
|
c
|
float
|
Parameter c, by default 2 * np.pi |
6.283185307179586
|
Returns:
| Type | Description |
|---|---|
float
|
The value of the Ackley function at x. |
Notes
Recommended search domain: x_i in [-32.768, 32.768] for all i. Global minimum: f(x) = 0 at x = (0, ..., 0). Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.beale(x: ndarray)
¤
Beale function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Beale function at x. |
Notes
Recommended search domain: x_i in [-4.5, 4.5] for i = 1, 2. Global minimum: f(x) = 0 at x = (3, 0.5). Two-dimensional.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.booth(x: ndarray)
¤
Booth function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Booth function at x. |
Notes
Recommended search domain: x_i in [-10, 10] for i = 1, 2. Global minimum: f(x) = 0 at x = (1, 3). Two-dimensional.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.branin(x: ndarray, a=1, b=0.12918450914398066, c=1.5915494309189535, r=6, s=10, t=0.039788735772973836)
¤
Branin function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
a
|
float
|
Parameter a, by default 1 |
1
|
b
|
float
|
Parameter b, by default 5.1 / (4 * np.pi**2) |
0.12918450914398066
|
c
|
float
|
Parameter c, by default 5 / np.pi |
1.5915494309189535
|
r
|
float
|
Parameter r, by default 6 |
6
|
s
|
float
|
Parameter s, by default 10 |
10
|
t
|
float
|
Parameter t, by default 1 / (8 * np.pi) |
0.039788735772973836
|
Returns:
| Type | Description |
|---|---|
float
|
The value of the Branin function at x. |
Notes
Recommended search domain: x_1 in [-5, 10], x_2 in [0, 15]. Global minima: f(x) = 0.397887 at x = (-pi, 12.275), (pi, 2.275), and (9.42478, 2.475). Two-dimensional.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.crossintray(x: ndarray)
¤
Cross-in-Tray function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Cross-in-Tray function at x. |
Notes
Recommended search domain: x_i in [-10, 10] for i = 1, 2. Global minima: f(x) = -2.06261 at x = (+/- 1.34941, +/- 1.34941). Two-dimensional.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.dixonprice(x: ndarray)
¤
Dixon Price function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Dixon Price function at x. |
Notes
Recommended search domain: x_i in [-10, 10] for all i. Global minimum: f(x) = 0 at x_i = 2 ** (-(2 ** i - 2) / 2 ** i). Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.easom(x: ndarray)
¤
Easom function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Easom function at x. |
Notes
Recommended search domain: x_i in [-100, 100] for i = 1, 2. Global minimum: f(x) = -1 at x = (pi, pi). Two-dimensional.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.eggholder(x: ndarray)
¤
Egg Holder function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Egg Holder function at x. |
Notes
Recommended search domain: x_i in [-512, 512] for i = 1, 2. Global minimum: f(x) = -959.6407 at x = (512, 404.2319). Two-dimensional.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.griewank(x: ndarray)
¤
Griewank function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Griewank function at x. |
Notes
Recommended search domain: x_i in [-600, 600] for all i. Global minimum: f(x) = 0 at x = (0, ..., 0). Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.levy(x: ndarray)
¤
Levy function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Levy function at x. |
Notes
Recommended search domain: x_i in [-10, 10] for all i. Global minimum: f(x) = 0 at x = (1, ..., 1). Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.rastrigin(x: ndarray)
¤
Rastrigin function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Rastrigin function at x. |
Notes
Recommended search domain: x_i in [-5.12, 5.12] for all i. Global minimum: f(x) = 0 at x = (0, ..., 0). Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.rosenbrock(x: ndarray)
¤
Rosenbrock function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Rosenbrock function at x. |
Notes
Recommended search domain: x_i in [-5, 10] for all i (some sources use [-2.048, 2.048]). Global minimum: f(x) = 0 at x = (1, ..., 1). Defined on any dimension d (most often used at d = 2).
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.rotatedhyperellipsoid(x: ndarray)
¤
Rotated Hyper-Ellipsoid function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Rotated Hyper-Ellipsoid function at x. |
Notes
Recommended search domain: x_i in [-65.536, 65.536] for all i. Global minimum: f(x) = 0 at x = (0, ..., 0). Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.schwefel(x: ndarray)
¤
Schwefel function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Schwefel function at x. |
Notes
Recommended search domain: x_i in [-500, 500] for all i. Global minimum: f(x) = 0 at x = (420.9687, ..., 420.9687). Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.sphere(x: ndarray)
¤
Sphere funct

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Sphere function at x. |
Notes
Recommended search domain: x_i in [-5.12, 5.12] for all i. Global minimum: f(x) = 0 at x = (0, ..., 0). Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
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 | |
f3dasm.datageneration.functions.styblinskitang(x: ndarray)
¤
Styblinski-Tang function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Styblinski-Tang function at x. |
Notes
Recommended search domain: x_i in [-5, 5] for all i. Global minimum: f(x) = -39.16599 * d at x = (-2.903534, ..., -2.903534), where d is the dimensionality. Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | |
f3dasm.datageneration.functions.threehump(x: ndarray)
¤
Three-Hump function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Three-Hump function at x. |
Notes
Recommended search domain: x_i in [-5, 5] for i = 1, 2. Global minimum: f(x) = 0 at x = (0, 0). Two-dimensional.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | |
f3dasm.datageneration.functions.zakharov(x: ndarray)
¤
Zakharov function

Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Input array |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of the Zakharov function at x. |
Notes
Recommended search domain: x_i in [-5, 10] for all i. Global minimum: f(x) = 0 at x = (0, ..., 0). Defined on any dimension d.
References
.. [1] Surjanovic, S. & Bingham, D. (2013). Virtual Library of Simulation Experiments: Test Functions and Datasets. https://www.sfu.ca/~ssurjano/optimization.html
Source code in src/f3dasm/_src/datageneration/benchmarkfunctions.py
775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | |
Built-in optimizers¤
f3dasm.optimization.cg(data_generator: DataGenerator, output_name: str, input_name: str, bounds: Optional[scipy.optimize.Bounds] = None, grad_f: Optional[Callable] = None, **hyperparameters) -> ScipyOptimizer
¤
Create a Conjugate Gradient block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_generator
|
DataGenerator
|
The data generator whose |
required |
output_name
|
str
|
Name of the output column to minimize. |
required |
input_name
|
str
|
Name of the input column controlled by CG. |
required |
bounds
|
Bounds
|
Bounds on variables (CG does not natively support bounds; kept for interface consistency). |
None
|
grad_f
|
callable
|
Gradient function. If |
None
|
**hyperparameters
|
Options forwarded to the CG optimizer, such as |
required |
Returns:
| Type | Description |
|---|---|
ScipyOptimizer
|
Configured CG block. |
See Also
scipy.optimize.minimize
Source code in src/f3dasm/_src/optimization/scipy_implementations.py
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 | |
f3dasm.optimization.lbfgsb(data_generator: DataGenerator, output_name: str, input_name: str, bounds: Optional[scipy.optimize.Bounds] = None, grad_f: Optional[Callable] = None, **hyperparameters) -> ScipyOptimizer
¤
Create an L-BFGS-B block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_generator
|
DataGenerator
|
The data generator whose |
required |
output_name
|
str
|
Name of the output column to minimize. |
required |
input_name
|
str
|
Name of the input column controlled by L-BFGS-B. |
required |
bounds
|
Bounds
|
Bounds on variables; L-BFGS-B supports box constraints natively. |
None
|
grad_f
|
callable
|
Gradient function. If |
None
|
**hyperparameters
|
Options forwarded to the L-BFGS-B optimizer, such as |
required |
Returns:
| Type | Description |
|---|---|
ScipyOptimizer
|
Configured L-BFGS-B block. |
See Also
scipy.optimize.minimize
Source code in src/f3dasm/_src/optimization/scipy_implementations.py
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 | |
f3dasm.optimization.nelder_mead(data_generator: DataGenerator, output_name: str, input_name: str, bounds: Optional[scipy.optimize.Bounds] = None, grad_f: Optional[Callable] = None, **hyperparameters) -> ScipyOptimizer
¤
Create a Nelder-Mead block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_generator
|
DataGenerator
|
The data generator whose |
required |
output_name
|
str
|
Name of the output column to minimize. |
required |
input_name
|
str
|
Name of the input column controlled by Nelder-Mead. |
required |
bounds
|
Bounds
|
Bounds on variables (standard Nelder-Mead does not support them). |
None
|
grad_f
|
callable
|
Gradient function (unused by Nelder-Mead; kept for interface consistency). |
None
|
**hyperparameters
|
Options forwarded to the Nelder-Mead optimizer, such as |
required |
Returns:
| Type | Description |
|---|---|
ScipyOptimizer
|
Configured Nelder-Mead block. |
See Also
scipy.optimize.minimize
Source code in src/f3dasm/_src/optimization/scipy_implementations.py
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 | |
f3dasm.optimization.tpesampler(output_name: str) -> OptunaUpdateStep
¤
Create an Optuna TPE-sampler update-step block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_name
|
str
|
Name of the output column to minimize. |
required |
Returns:
| Type | Description |
|---|---|
OptunaUpdateStep
|
Update-step block wrapping Optuna's TPE sampler. |
Source code in src/f3dasm/_src/optimization/optuna_implementations.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |