Skip to content

Commit 4f2b735

Browse files
author
brendan
committed
docstring update
1 parent 4c868d0 commit 4f2b735

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

bayes_opt/bayesian_optimization.py

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -262,27 +262,9 @@ def maximize(self,
262262
Number of iterations where the method attempts to find the maximum
263263
value.
264264
265-
acq: {'ucb', 'ei', 'poi'}
266-
The acquisition method used.
267-
* 'ucb' stands for the Upper Confidence Bounds method
268-
* 'ei' is the Expected Improvement method
269-
* 'poi' is the Probability Of Improvement criterion.
270-
271-
kappa: float, optional(default=2.576)
272-
Parameter to indicate how closed are the next parameters sampled.
273-
Higher value = favors spaces that are least explored.
274-
Lower value = favors spaces where the regression function is
275-
the highest.
276-
277-
kappa_decay: float, optional(default=1)
278-
`kappa` is multiplied by this factor every iteration.
279-
280-
kappa_decay_delay: int, optional(default=0)
281-
Number of iterations that must have passed before applying the
282-
decay to `kappa`.
283-
284-
xi: float, optional(default=0.0)
285-
[unused]
265+
acquisition_function: object, optional
266+
An instance of bayes_opt.util.UtilityFunction.
267+
If nothing is passed, a default using ucb is used
286268
"""
287269
self._prime_subscriptions()
288270
self.dispatch(Events.OPTIMIZATION_START)

bayes_opt/util.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,26 @@ def to_minimize(x):
9696
class UtilityFunction(object):
9797
"""
9898
An object to compute the acquisition functions.
99+
100+
kind: {'ucb', 'ei', 'poi'}
101+
* 'ucb' stands for the Upper Confidence Bounds method
102+
* 'ei' is the Expected Improvement method
103+
* 'poi' is the Probability Of Improvement criterion.
104+
105+
kappa: float, optional(default=2.576)
106+
Parameter to indicate how closed are the next parameters sampled.
107+
Higher value = favors spaces that are least explored.
108+
Lower value = favors spaces where the regression function is
109+
the highest.
110+
111+
kappa_decay: float, optional(default=1)
112+
`kappa` is multiplied by this factor every iteration.
113+
114+
kappa_decay_delay: int, optional(default=0)
115+
Number of iterations that must have passed before applying the
116+
decay to `kappa`.
117+
118+
xi: float, optional(default=0.0)
99119
"""
100120

101121
def __init__(self, kind='ucb', kappa=2.576, xi=0, kappa_decay=1, kappa_decay_delay=0):

0 commit comments

Comments
 (0)