13.6.12. Macro “modelerbuildSimpleGPEstim.C”
13.6.12.1. Objective
This macro is the one described in Prediction of a new data set, one-by-one approach, to create and use
a simple gaussian process, whose training (utf_4D_train.dat) and testing (utf_4D_test.dat)
database can both be found in the document folder of the Uranie installation
(${URANIESYS}/share/uranie/docUMENTS). It uses the simple one-by-one approch described in the
[Bla17] for completness.
13.6.12.2. Macro Uranie
// Load observations
TDataServer *tdsObs = new TDataServer("tdsObs", "observations");
TDataServer *tdsEstim = new TDataServer("tdsEstim", "estimations");
tdsObs->fileDataRead("utf_4D_train.dat");
// Construct the GPBuilder
TGPBuilder *gpb = new TGPBuilder(tdsObs, // observations data
"x1:x2:x3:x4", // list of input variables
"y", // output variable
"matern3/2"); // name of the correlation function
// Search for the optimal hyper-parameters
gpb->findOptimalParameters("ML", // optimisation criterion
100, // screening design size
"neldermead", // optimisation algorithm
500); // max. number of optimisation iterations
// Construct the kriging model
TKriging *krig = gpb->buildGP();
// Display model information
krig->printLog();
// Load the data to estimate
tdsEstim->fileDataRead("utf_4D_test.dat");
// Construction of the launcher
TLauncher2 *lanceur = new TLauncher2(tdsEstim, // data to estimate
krig, // model used for the estimation
"x1:x2:x3:x4", // list of the input variables
"yEstim:vEstim"); // name given to the model's outputs
// Launch the estimations
lanceur->solverLoop();
// Display some results
tdsEstim->draw("yEstim:y");
13.6.12.3. Graph
Figure 13.43 Graph of the macro “modelerbuildSimpleGPEstim.C”