4af750bec058da0cf5d4a3245a443549b9d7fd33,skopt/dummy_opt.py,,dummy_minimize,#Any#Any#Any#Any#,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)
        y[i] = func(X[i])

    res = OptimizeResult()
    best = np.argmin(y)
    res.x = X[best]

After Change


    lb, ub = extract_bounds(bounds)

    X = lb + (ub - lb) * rng.rand(maxiter, n_params)
    init_y = func(X[0])
    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)])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 3

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: scipy/scipy
Commit Name: 708782344c48074512a2c261be9c95ce147d480e
Time: 2018-03-23
Author: sudheerachary115@gmail.com
File Name: scipy/optimize/zeros.py
Class Name:
Method Name: newton


Project Name: nipy/dipy
Commit Name: c173309b54984be779728524da100fb46e0ac373
Time: 2010-04-14
Author: matthew.brett@gmail.com
File Name: dipy/io/dicomwrappers.py
Class Name: Wrapper
Method Name: maybe_same_vol


Project Name: pfnet/optuna
Commit Name: 0ded035e6f2e8e449d5a7ea829f3a3c88cd8fc9d
Time: 2018-03-20
Author: t.akiba.65536@gmail.com
File Name: tests/test_study.py
Class Name: Func
Method Name: __call__


Project Name: lebedov/scikit-cuda
Commit Name: 24efdf4f57841d5d73fda3745b96a1b102ca484f
Time: 2015-11-25
Author: lev@columbia.edu
File Name: skcuda/linalg.py
Class Name:
Method Name: diag


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