b0699b34e2b16cb3abbd22c397077cc6c21ef279,skopt/optimizer/base.py,,base_minimize,#,29

Before Change


        elif acq_optimizer == "lbfgs":
            best = np.inf

            for j in range(n_restarts_optimizer):
                x0 = space.transform(space.rvs(n_samples=1,
                                               random_state=rng))[0]

                with warnings.catch_warnings():
                    warnings.simplefilter("ignore")
                    x, a, _ = fmin_l_bfgs_b(
                        gaussian_acquisition_1D, x0,
                        args=(gp, np.min(yi), acq_func, xi, kappa),
                        bounds=space.transformed_bounds,
                        approx_grad=False,
                        maxiter=20)

                if a < best:
                    next_x, best = x, a

        // lbfg should handle this but just in case there are precision errors.
        next_x = np.clip(
            next_x, transformed_bounds[:, 0], transformed_bounds[:, 1])
        next_x = space.inverse_transform(next_x.reshape((1, -1)))[0]
        yi.append(func(next_x))

After Change


                    maxiter=20) for x in x0)
                results = parallel(jobs)

            cand_xs = np.array([r[0] for r in results])
            cand_acqs = np.array([r[1] for r in results])
            best_ind = np.argmin(cand_acqs)
            a = cand_acqs[best_ind]
            if a < best:
                next_x, best = cand_xs[best_ind], a
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: scikit-optimize/scikit-optimize
Commit Name: b0699b34e2b16cb3abbd22c397077cc6c21ef279
Time: 2016-11-30
Author: mks542@nyu.edu
File Name: skopt/optimizer/base.py
Class Name:
Method Name: base_minimize


Project Name: vitchyr/rlkit
Commit Name: 9bdbb11cf27060e7847a87dcdf691dd6b96ce6df
Time: 2020-08-09
Author: 38036768+YangRui2015@users.noreply.github.com
File Name: rlkit/data_management/obs_dict_replay_buffer.py
Class Name: ObsDictRelabelingBuffer
Method Name: random_batch


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: fc4917ae8a7320fc9a258b50d82a177ed2124a91
Time: 2018-12-21
Author: jcastaldo08@gmail.com
File Name: category_encoders/basen.py
Class Name: BaseNEncoder
Method Name: fit_base_n_encoding