a676a50e99e489bbd5ee0ed7af9a50a02c074931,bayes_opt/bayesian_optimization.py,BayesianOptimization,init,#BayesianOptimization#,80

Before Change


        self.init_points += list(map(list, zip(*l)))

        // Create empty list to store the new values of the function
        y_init = []

        // Evaluate target function at all initialization
        // points (random + explore)
        for x in self.init_points:

            y_init.append(self.f(**dict(zip(self.keys, x))))

            if self.verbose:
                self.plog.print_step(x, y_init[-1])

        // Append any other points passed by the self.initialize method (these
        // also have a corresponding target value passed by the user).
        self.init_points += self.x_init

        // Append the target value of self.initialize method.
        y_init += self.y_init

        // Turn it into np array and store.
        self.X = np.asarray(self.init_points)
        self.Y = np.asarray(y_init)

After Change


        // Evaluate target function at all initialization
        // points (random + explore)
        for x in self.init_points:
            self.X = np.vstack((self.X, np.asarray(x).reshape((1, -1))))
            self.Y = np.append(self.Y, self.f(**dict(zip(self.keys, x))))

            if self.verbose:
                self.plog.print_step(x, y_init[-1])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: fmfn/BayesianOptimization
Commit Name: a676a50e99e489bbd5ee0ed7af9a50a02c074931
Time: 2017-10-11
Author: ajnisbet@gmail.com
File Name: bayes_opt/bayesian_optimization.py
Class Name: BayesianOptimization
Method Name: init


Project Name: ANSSI-FR/SecuML
Commit Name: 39efccc696a1c20745a52cc50935cdc24f92230d
Time: 2019-05-09
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/classif/classifiers/__init__.py
Class Name: Classifier
Method Name: _predict_streaming


Project Name: scikit-image/scikit-image
Commit Name: f8d9a6c144ef84bad2478a4ba4eedb1c559274e0
Time: 2020-11-11
Author: rfezzani@gmail.com
File Name: skimage/_shared/coord.py
Class Name:
Method Name: ensure_spacing


Project Name: fmfn/BayesianOptimization
Commit Name: a676a50e99e489bbd5ee0ed7af9a50a02c074931
Time: 2017-10-11
Author: ajnisbet@gmail.com
File Name: bayes_opt/bayesian_optimization.py
Class Name: BayesianOptimization
Method Name: init