23 #include "testfunctions.hpp" 31 void display(
void ){ GLOBAL_MATPLOT.display(); }
32 void reshape(
int w,
int h ){ GLOBAL_MATPLOT.reshape(w,h); }
33 void idle(
void ) { glutPostRedisplay(); }
35 void mouse(
int button,
int state,
int x,
int y ){ GLOBAL_MATPLOT.mouse(button,state,x,y); }
36 void motion(
int x,
int y ){ GLOBAL_MATPLOT.motion(x,y); }
37 void passive(
int x,
int y ){ GLOBAL_MATPLOT.passivemotion(x,y); }
39 void keyboard(
unsigned char key,
int x,
int y)
41 GLOBAL_MATPLOT.keyboard(key, x, y);
44 GLOBAL_MATPLOT.toogleRUN();
48 GLOBAL_MATPLOT.setSTEP();
56 while ((option < 1) || (option > 5))
58 std::cout <<
"Please select an option for the parameters:\n\n" 59 <<
" 1- Default parameters.\n" 60 <<
" 2- Student t process model.\n" 61 <<
" 3- Combined kernel.\n" 62 <<
" 4- Lower Confidence Bound.\n" 63 <<
" 5- A-optimality criteria.\n\n" 67 std::istringstream is(input);
73 int main(
int nargs,
char *args[])
75 bopt_params parameters = initialize_parameters_to_default();
85 set_surrogate(¶meters,
"sStudentTProcessNIG");
91 set_kernel(¶meters,
"kSum(kPoly3,kRQISO)");
92 double mean[128] = {1, 1, 1, 1};
93 double std[128] = {5, 5, 5, 5};
95 memcpy(parameters.
kernel.
hp_mean, mean, nhp *
sizeof(
double));
96 memcpy(parameters.
kernel.
hp_std,std, nhp *
sizeof(
double));
101 set_criteria(¶meters,
"cLCB");
106 set_criteria(¶meters,
"cAopt");
114 boost::scoped_ptr<ExampleOneD> opt(
new ExampleOneD(parameters_class));
115 GLOBAL_MATPLOT.init(opt.get(),1);
117 glutInit(&nargs, args);
118 glutCreateWindow(50,50,800,650);
119 glutDisplayFunc( display );
120 glutReshapeFunc( reshape );
121 glutIdleFunc( idle );
122 glutMotionFunc( motion );
123 glutMouseFunc( mouse );
124 glutPassiveMotionFunc(passive);
125 glutKeyboardFunc( keyboard );
size_t n_iterations
Maximum BayesOpt evaluations (budget)
size_t n_hp
Number of kernel hyperparameters.
int verbose_level
Neg-Error,0-Warning,1-Info,2-Debug -> stdout 3-Error,4-Warning,5-Info,>5-Debug -> logfile...
Plots the evolution (nonparametric process, criteria or contour plots) of 1D and 2D problems...
size_t n_init_samples
Number of samples before optimization.
double hp_mean[128]
Kernel hyperparameters prior (mean, log space)
kernel_parameters kernel
Kernel parameters.
Configuration parameters.
size_t n_crit_params
Number of criterion hyperparameters.
double hp_std[128]
Kernel hyperparameters prior (st dev, log space)
size_t n_iter_relearn
Number of samples before relearn kernel.
double crit_params[128]
Criterion hyperparameters (if needed)