Skip to content

Commit adc0ce3

Browse files
Update installation instructions, fix for Python 3
1 parent 0c04705 commit adc0ce3

File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
Summary
2-
=======
1+
# Summary
2+
33
This repository contains some basic code for Bayesian optimization
44

5-
Installation
6-
============
75

8-
Install the current development version of scikit-learn (or sklearn version 0.18 once this is available)
6+
## Installation
97

10-
git clone [email protected]:scikit-learn/scikit-learn.git
11-
cd sklearn
12-
sudo python setup.py install
8+
Install dependencies
9+
10+
1. Install [nlopt](https://github.com/stevengj/nlopt) for your Python version.
11+
2. Install dependencies with pip: `[sudo] pip[3] install -r requirements.txt`
12+
(requirements.txt can be found in the repository)
13+
3. (Optional:) install [BOLeRo](https://github.com/rock-learning/bolero)
1314

1415
Install `bayesian_optimization`
1516

16-
git clone [email protected]:jmetzen/bayesian_optimization.git
17+
git clone https://github.com/rock-learning/bayesian_optimization.git
1718
cd bayesian_optimization
1819
sudo python setup.py install
1920

2021

21-
Usage
22-
=====
22+
## Usage
23+
2324
Some usage examples are contained in the folder "examples". To reproduce the results from the ICML 2016 paper
2425
"Minimum Regret Search for Single- and Multi-Task Optimization", please execute the jupyter notebook "examples/mrs_evaluation.ipynb."
2526

bayesian_optimization/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from bayesian_optimization import (BayesianOptimizer, REMBOOptimizer,
2-
InterleavedREMBOOptimizer)
3-
from model import GaussianProcessModel
4-
from acquisition_functions import (ProbabilityOfImprovement,
5-
ExpectedImprovement, UpperConfidenceBound, GPUpperConfidenceBound,
6-
EntropySearch, MinimalRegretSearch, create_acquisition_function)
1+
from .bayesian_optimization import (BayesianOptimizer, REMBOOptimizer,
2+
InterleavedREMBOOptimizer)
3+
from .model import GaussianProcessModel
4+
from .acquisition_functions import (
5+
ProbabilityOfImprovement, ExpectedImprovement, UpperConfidenceBound,
6+
GPUpperConfidenceBound, EntropySearch, MinimalRegretSearch,
7+
create_acquisition_function)

bayesian_optimization/acquisition_functions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
from scipy.stats import norm, entropy
66
from scipy.special import erf
77

8-
from sklearn.cluster import KMeans
9-
from sklearn.neighbors import NearestNeighbors
10-
118

129
class AcquisitionFunction(object):
1310
""" Abstract base class for acquisition functions."""

bayesian_optimization/bayesian_optimization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def __init__(self, interleaved_runs=2, *args, **kwargs):
333333
*args, **kwargs)
334334
for run in range(interleaved_runs)]
335335
self.rembos = cycle(self.rembos)
336-
self.current_rembo = self.rembos.next()
336+
self.current_rembo = next(self.rembos)
337337

338338
self.X_ = []
339339
self.y_ = []
@@ -361,4 +361,4 @@ def update(self, X, y):
361361
self.y_.append(y)
362362

363363
self.current_rembo.update(X, y)
364-
self.current_rembo = self.rembos.next()
364+
self.current_rembo = next(self.rembos)

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
scikit-learn
2+
scipy

0 commit comments

Comments
 (0)