fa6ccd7f25e838d964d3e8249a7d8a2f622581b8,skopt/optimizer/optimizer.py,Optimizer,tell,#Optimizer#,369

Before Change


                // minimization starts from `n_restarts_optimizer` different
                // points and the best minimum is used
                elif self.acq_optimizer == "lbfgs":
                    x0 = X[np.argsort(values)]

                    with warnings.catch_warnings():
                        warnings.simplefilter("ignore")
                        results = Parallel(n_jobs=self.n_jobs)(
                            delayed(fmin_l_bfgs_b)(
                                gaussian_acquisition_1D, x,
                                args=(est, np.min(self.yi), cand_acq_func,
                                      self.acq_func_kwargs),
                                bounds=self.space.transformed_bounds,
                                approx_grad=False,
                                maxiter=20)
                            for x in x0)

                    cand_xs = np.array([r[0] for r in results])
                    cand_acqs = np.array([r[1] for r in results])
                    next_x = cand_xs[np.argmin(cand_acqs)]

                // lbfgs should handle this but just in case there are
                // precision errors.

After Change


                // minimization starts from `n_restarts_optimizer` different
                // points and the best minimum is used
                elif self.acq_optimizer == "lbfgs":
                    x0 = X[np.argsort(values)[:self.n_restarts_optimizer]]

                    with warnings.catch_warnings():
                        warnings.simplefilter("ignore")
                        results = Parallel(n_jobs=self.n_jobs)(
                            delayed(fmin_l_bfgs_b)(
                                gaussian_acquisition_1D, x,
                                args=(est, np.min(self.yi), cand_acq_func,
                                      self.acq_func_kwargs),
                                bounds=self.space.transformed_bounds,
                                approx_grad=False,
                                maxiter=20)
                            for x in x0)

                    cand_xs = np.array([r[0] for r in results])
                    cand_acqs = np.array([r[1] for r in results])
                    next_x = cand_xs[np.argmin(cand_acqs)]

                // lbfgs should handle this but just in case there are
                // precision errors.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: scikit-optimize/scikit-optimize
Commit Name: fa6ccd7f25e838d964d3e8249a7d8a2f622581b8
Time: 2017-08-04
Author: betatim@gmail.com
File Name: skopt/optimizer/optimizer.py
Class Name: Optimizer
Method Name: tell


Project Name: scikit-optimize/scikit-optimize
Commit Name: ff79459931a63a463bbf6defada31d4638918575
Time: 2017-08-04
Author: betatim@gmail.com
File Name: skopt/optimizer/optimizer.py
Class Name: Optimizer
Method Name: tell


Project Name: scikit-learn/scikit-learn
Commit Name: df338cddc8094bdb226c7ec4cd4233ac5cffa806
Time: 2020-03-05
Author: rth.yurchak@pm.me
File Name: examples/linear_model/plot_poisson_regression_non_normal_loss.py
Class Name:
Method Name: _cumulated_claims