Ejemplo n.º 1
0

# define a function f
def synthetic(x):
    return np.exp(-(x - 4)**2) + np.exp(-(x - 6)**2 / 10) + 1 / (x**2 + 1)


def sincos(x):
    return x * np.sin(x) + x * np.cos(2 * x)


myfunction_list = []

myfunction_list.append(functions.rosenbrock())
myfunction_list.append(functions.branin())
myfunction_list.append(functions.dropwave())
myfunction_list.append(functions.goldstein())
myfunction_list.append(functions.hartman_3d())

myfunction_list.append(functions.ackley(input_dim=5))
myfunction_list.append(functions.alpine1(input_dim=5))
myfunction_list.append(functions.alpine2(input_dim=5))
myfunction_list.append(functions.hartman_6d())
myfunction_list.append(functions.alpine2(input_dim=10))
myfunction_list.append(
    functions.gSobol(a=np.array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])))

algorithm_list = []

algorithm_list.append('FBO')
algorithm_list.append('VolumeDoubling')
Ejemplo n.º 2
0
import warnings
warnings.filterwarnings("ignore")
#%matplotlib inline.

random.seed('6789')

#myfunction=functions.gSobol(a=np.array([1,1,1,1,1]))    
#myfunction=functions.gSobol(a=np.array([1,1,1,1,1,1,1,1,1,1]))
#myfunction=functions.hartman_3d()
#myfunction=functions.hartman_6d()
#myfunction=functions.beale()
#myfunction=functions.forrester()
#myfunction=functions.alpine2(input_dim=5)
#myfunction=functions.alpine2(input_dim=10)
myfunction=functions.dropwave()



func=myfunction.func


# define a bound for the parameter

mybound=myfunction.bounds

yoptimal=myfunction.fmin*myfunction.ismax

gp_params = {'theta':1*myfunction.input_dim,'noise_delta':0.000001}

nRepeat=3