1b17dc0090dbf4cebdfe2acc9dbee06179155225,GPflowOpt/acquisition/mes.py,MaxvalueEntropySearch,binary_search,#MaxvalueEntropySearch#Any#Any#Any#Any#Any#,82
Before Change
def binary_search(self, left, right, func, val, threshold=0.01):
vfunc = np.vectorize(func)
x = np.flip(np.linspace(left, right, 100), axis=0)
y = vfunc(x)
i = np.searchsorted(y, val)
l, r = x[i], x[i - 1]
mid = (l + r) / 2
ev = func(mid)
After Change
self.samples.set_data(mins)
def binary_search(self, left, right, func, val, threshold=0.01):
x = np.linspace(left, right, 100)[::-1]
i = np.searchsorted(func(x), val)
mid = np.sum(x[i-1:i+1]) / 2
ev = func(mid)
if np.abs(ev - val) > threshold:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: GPflow/GPflowOpt
Commit Name: 1b17dc0090dbf4cebdfe2acc9dbee06179155225
Time: 2017-08-10
Author: joachim.vanderherten@ugent.be
File Name: GPflowOpt/acquisition/mes.py
Class Name: MaxvalueEntropySearch
Method Name: binary_search
Project Name: tensorflow/models
Commit Name: 64710c051f26a2778c03fc15ef29c4bcae01df32
Time: 2018-08-22
Author: reedwm@google.com
File Name: official/recommendation/ncf_main.py
Class Name:
Method Name: evaluate_model
Project Name: aleju/imgaug
Commit Name: 1ca42e57de5f3eca8f81704ef7b753734cfd89cd
Time: 2020-01-11
Author: kontakt@ajung.name
File Name: imgaug/augmenters/flip.py
Class Name:
Method Name: _fliplr_cv2