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])