Exemplo n.º 1
0
 def fun(restart_iter):
     np.random.seed(restart_iter)
     kern = LCM(input_dim=self.problem.DP, num_outputs=data.NI, Q=Q)
     # print('I am here')
     return kern.train_kernel(X=data.X,
                              Y=data.Y,
                              computer=self.computer,
                              kwargs=kwargs)
Exemplo n.º 2
0
 def fun(restart_iter):
     # np.random.seed(restart_iter)
     np.random.seed()
     kern = LCM(input_dim=len(data.P[0][0]),
                num_outputs=data.NI,
                Q=Q)
     return kern.train_kernel(X=data.P,
                              Y=data.O,
                              computer=self.computer,
                              kwargs=kwargs)
Exemplo n.º 3
0
 def fun(restart_iter):
     if ('seed' in kwargs):
         seed = kwargs['seed'] * kwargs['model_restart_threads'] + restart_iter
     else:
         seed = restart_iter
     np.random.seed(seed)
     kern = LCM(input_dim = len(data.P[0][0]), num_outputs = data.NI, Q = Q)
     if (restart_iter == 0 and self.M is not None):
         kern.set_param_array(self.M.kern.get_param_array())
     return kern.train_kernel(X = data.P, Y = data.O, computer = self.computer, kwargs = kwargs)