GPyOpt: Initial designs

Written by Javier Gonzalez, Amazon Reseach Cambridge

Last updated, July 2017.

Before starting the optimization, it is important to initialize the model. This notebook quickly takes you over the available initial designs available in GPyOpt.

In [ ]:
%pylab inline 
import numpy as np
import GPyOpt
import GPy
from GPyOpt.experiment_design import initial_design
import matplotlib.pyplot as plt
In [ ]:
func  = GPyOpt.objective_examples.experimentsNd.alpine1(input_dim=2) 

mixed_domain =[{'name': 'var1_2', 'type': 'continuous', 'domain': (-10,10),'dimensionality': 1},
               {'name': 'var5', 'type': 'continuous', 'domain': (-1,5)}]

space = GPyOpt.Design_space(mixed_domain)
data_init = 500
In [ ]:
### --- Grid design
X = initial_design('grid',space,data_init)
plt.plot(X[:,0],X[:,1],'b.')
plt.title('Grid design')
In [ ]:
### --- Random initial design
X = initial_design('random',space,data_init)
plt.plot(X[:,0],X[:,1],'b.')
plt.title('Random design')
In [ ]:
### --- Latin design
X = initial_design('latin',space,data_init)
plt.plot(X[:,0],X[:,1],'b.')
plt.title('Latin design')
In [ ]:
### --- Sobol design
X = initial_design('sobol',space,data_init)
plt.plot(X[:,0],X[:,1],'b.')
plt.title('Sobol design')