4af750bec058da0cf5d4a3245a443549b9d7fd33,skopt/dummy_opt.py,,dummy_minimize,#,9
Before Change
n_params = len(bounds)
lb, ub = extract_bounds(bounds)
X = np.zeros((maxiter, n_params))
y = np.zeros(maxiter)
for i in range(maxiter):
X[i] = lb + (ub - lb) * rng.rand(n_params)
After Change
if not np.isscalar(init_y):
raise ValueError(
"The function to be optimized should return a scalar")
y = np.asarray([init_y] + [func(X[i]) for i in range(maxiter - 1)])
res = OptimizeResult()
best = np.argmin(y)
res.x = X[best]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: scikit-optimize/scikit-optimize
Commit Name: 4af750bec058da0cf5d4a3245a443549b9d7fd33
Time: 2016-04-05
Author: manojkumarsivaraj334@gmail.com
File Name: skopt/dummy_opt.py
Class Name:
Method Name: dummy_minimize
Project Name: Calamari-OCR/calamari
Commit Name: de52463f855369ad17148054fa5a0a634c6b99a1
Time: 2021-01-19
Author: christoph.wick@planet-ai.de
File Name: calamari_ocr/ocr/dataset/datareader/pagexml/reader.py
Class Name: PageXMLReader
Method Name: cutout
Project Name: has2k1/plotnine
Commit Name: 3ea42ce3224572800e791cab9ee540efee6d6ff3
Time: 2020-04-29
Author: has2k1@gmail.com
File Name: plotnine/stats/stat_density.py
Class Name:
Method Name: compute_density