23 from bayesoptmodule
import BayesOptContinuous
24 from multiprocessing
import Process, Pipe
30 total = total + (value -0.33)*(value-0.33)
47 def __init__ (self, pipe, n_dim):
48 Process.__init__(self)
49 BayesOptContinuous.__init__(self, n_dim)
53 mvalue, x_out, error = self.
optimize()
54 self.
pipe.send(
'STOP')
61 def evaluateSample(self, x):
63 result = self.
pipe.recv()
67 if __name__ ==
'__main__':
70 'n_init_samples' : 20,
71 's_name' :
"sGaussianProcessNormal",
72 'c_name' :
"cHedge(cEI,cLCB,cExpReturn,cOptimisticSampling)" 75 pipe_par, pipe_child = Pipe()
78 bo.parameters = params
80 p = Process(target=worker, args=(pipe_par,))
def optimize(self)
Main function.
Python Module for BayesOptContinuous.