def __init__(self, name, l=0):
        self.m = start.deep_copy()
        self.s = flex.double([2, 2])
        self.l = l
        self.name = name
        self.fcount = 0
        from cma_es import cma_es_interface
        self.minimizer = cma_es_interface.cma_es_driver(
            2, self.m, self.s, self.my_function, self.l)
        print "CMA-ES ITERATIONS", self.minimizer.count, self.fcount, "SOLUTION", list(
            self.minimizer.x_final), self.my_function(self.minimizer.x_final)

        self.x = self.minimizer.x_final.deep_copy()
    def __init__(self, name, l=0):
        self.m = start.deep_copy()
        self.s = flex.double([2, 2])
        self.l = l
        self.name = name
        self.fcount = 0
        from cma_es import cma_es_interface

        self.minimizer = cma_es_interface.cma_es_driver(2, self.m, self.s, self.my_function, self.l)
        print "CMA-ES ITERATIONS", self.minimizer.count, self.fcount, "SOLUTION", list(
            self.minimizer.x_final
        ), self.my_function(self.minimizer.x_final)

        self.x = self.minimizer.x_final.deep_copy()
Beispiel #3
0
 def __init__(self, functions, x_obs, y_obs):
     super(cma_es_minimiser, self).__init__(functions, x_obs, y_obs)
     sigma = flex.double(self.x.size(), 1)
     self.minimizer = cma_es_interface.cma_es_driver(
         len(self.x), self.x.deep_copy(), sigma,
         self.compute_functional)
 def __init__(self, functions, x_obs, y_obs):
   super(cma_es_minimiser, self).__init__(functions, x_obs, y_obs)
   sigma = flex.double(self.x.size(), 1)
   self.minimizer = cma_es_interface.cma_es_driver(len(self.x), self.x.deep_copy(), sigma, self.compute_functional)