-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from jungtaekkim/0.1.6
0.1.6
- Loading branch information
Showing
61 changed files
with
638 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: pytest | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
python-version: | ||
- '3.6' | ||
- '3.7' | ||
- '3.8' | ||
- '3.9' | ||
- '3.10' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
pip install pytest | ||
pip install scipy | ||
- name: Run pytest | ||
run: | | ||
pip install . | ||
pytest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# BayesO Benchmarks | ||
[![Build Status](https://app.travis-ci.com/jungtaekkim/bayeso-benchmarks.svg?branch=main)](https://app.travis-ci.com/jungtaekkim/bayeso-benchmarks) | ||
[![Build Status](https://github.com/jungtaekkim/bayeso-benchmarks/actions/workflows/pytest.yml/badge.svg)](https://github.com/jungtaekkim/bayeso-benchmarks/actions/workflows/pytest.yml) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
|
||
Benchmarks for Bayesian optimization. | ||
The details of benchmark functions can be found in [these notes](http://jungtaek.github.io/notes/benchmarks_bo.pdf). | ||
The details of benchmark functions can be found in [these notes](https://jungtaek.github.io/notes/benchmarks_bo.pdf). | ||
|
||
## Installation | ||
We recommend installing it with `virtualenv`. | ||
|
@@ -65,10 +65,7 @@ Y_noise = obj_fun.output_gaussian_noise(X) | |
``` | ||
|
||
## Author | ||
* [Jungtaek Kim](http://jungtaek.github.io) (POSTECH) | ||
|
||
## Contact | ||
* Jungtaek Kim: [[email protected]](mailto:[email protected]) | ||
* [Jungtaek Kim](https://jungtaek.github.io) (POSTECH) | ||
|
||
## License | ||
[MIT License](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# | ||
# author: Jungtaek Kim ([email protected]) | ||
# last updated: June 24, 2021 | ||
# last updated: October 23, 2021 | ||
# | ||
|
||
__version__ = '0.1.5' | ||
|
||
__version__ = '0.1.6' | ||
|
||
|
||
from bayeso_benchmarks.inf_dim_ackley import Ackley | ||
|
@@ -24,6 +25,9 @@ | |
from bayeso_benchmarks.two_dim_eggholder import Eggholder | ||
from bayeso_benchmarks.two_dim_goldsteinprice import GoldsteinPrice | ||
from bayeso_benchmarks.two_dim_holdertable import HolderTable | ||
from bayeso_benchmarks.two_dim_kim1 import Kim1 | ||
from bayeso_benchmarks.two_dim_kim2 import Kim2 | ||
from bayeso_benchmarks.two_dim_kim3 import Kim3 | ||
from bayeso_benchmarks.two_dim_michalewicz import Michalewicz | ||
from bayeso_benchmarks.two_dim_sixhumpcamel import SixHumpCamel | ||
from bayeso_benchmarks.two_dim_threehumpcamel import ThreeHumpCamel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# author: Jungtaek Kim ([email protected]) | ||
# last updated: October 27, 2021 | ||
# | ||
|
||
import numpy as np | ||
|
||
from bayeso_benchmarks.benchmark_base import Function | ||
|
||
|
||
def fun_target(bx, dim_bx): | ||
assert len(bx.shape) == 1 | ||
assert bx.shape[0] == dim_bx | ||
|
||
y = np.sin(bx[0]) + np.cos(bx[1]) + 0.016 * (bx[0] - 5.0)**2 + 0.008 * (bx[1] - 5.0)**2 | ||
return y | ||
|
||
|
||
class Kim1(Function): | ||
def __init__(self, seed=None): | ||
assert isinstance(seed, (type(None), int)) | ||
|
||
dim_bx = 2 | ||
bounds = np.array([ | ||
[-16.0, 16.0], | ||
[-16.0, 16.0], | ||
]) | ||
global_minimizers = np.array([ | ||
[4.72130726, 3.17086303], | ||
]) | ||
global_minimum = -1.9715232347905773 | ||
function = lambda bx: fun_target(bx, dim_bx) | ||
|
||
try: | ||
super().__init__(dim_bx, bounds, global_minimizers, global_minimum, function, seed=seed) | ||
except: | ||
super(Kim1, self).__init__(dim_bx, bounds, global_minimizers, global_minimum, function, seed=seed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# author: Jungtaek Kim ([email protected]) | ||
# last updated: October 27, 2021 | ||
# | ||
|
||
import numpy as np | ||
|
||
from bayeso_benchmarks.benchmark_base import Function | ||
|
||
|
||
def fun_target(bx, dim_bx): | ||
assert len(bx.shape) == 1 | ||
assert bx.shape[0] == dim_bx | ||
|
||
y = np.sin(bx[0] / 1.0) + np.cos(bx[1] / 1.0) \ | ||
+ np.sin(bx[0] / 2.0) + np.cos(bx[1] / 2.0) \ | ||
+ np.sin(bx[0] / 4.0) + np.cos(bx[1] / 4.0) \ | ||
+ np.sin(bx[0] / 8.0) + np.cos(bx[1] / 8.0) \ | ||
+ np.sin(bx[0] / 16.0) + np.cos(bx[1] / 16.0) \ | ||
+ 0.0032 * (bx[0] - 20.0)**2 + 0.0016 * (bx[1] - 20.0)**2 | ||
return y | ||
|
||
|
||
class Kim2(Function): | ||
def __init__(self, seed=None): | ||
assert isinstance(seed, (type(None), int)) | ||
|
||
dim_bx = 2 | ||
bounds = np.array([ | ||
[-128.0, 128.0], | ||
[-128.0, 128.0], | ||
]) | ||
global_minimizers = np.array([ | ||
[-2.1013466, 34.14526252], | ||
]) | ||
global_minimum = -3.454387473489018 | ||
function = lambda bx: fun_target(bx, dim_bx) | ||
|
||
try: | ||
super().__init__(dim_bx, bounds, global_minimizers, global_minimum, function, seed=seed) | ||
except: | ||
super(Kim2, self).__init__(dim_bx, bounds, global_minimizers, global_minimum, function, seed=seed) |
Oops, something went wrong.