13.6.10. Macro “modelerbuildGPInitPoint.C”
13.6.10.1. Objective
This macro is the one described in Choice of the initial point of the optimisation, that creates a
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), and whose starting point, in the parameter space, is
specified.
13.6.10.2. Macro Uranie
// Load observations
TDataServer *tdsObs = new TDataServer("tdsObs", "observations");
tdsObs->fileDataRead("utf_4D_train.dat");
// Construct the GPBuilder
TGPBuilder *gpb = new TGPBuilder(tdsObs, "x1:x2:x3:x4", "y", "matern3/2");
// Set the correlation function parameters
Double_t params[4] = {1.0, 0.25, 0.01, 0.3};
gpb->getCorrFunction()->setParameters(params);
// Find the optimal parameters
gpb->findOptimalParameters("ML", // optimisation criterion
0, // screening size MUST be equal to 0
"neldermead", // optimisation algorithm
500, // max. number of optimisation iterations
kFALSE); // we don't reset the parameters of the GP builder
// Create the kriging model
TKriging *krig = gpb->buildGP();
// Display model information
krig->printLog();
13.6.10.3. Console
This is the result of the last command:
*******************************
** TKriging::printLog[]
*******************************
Input Variables: x1:x2:x3:x4
Output Variable: y
Deterministic trend:
Correlation function: URANIE::Modeler::TMatern32CorrFunction
Correlation length: normalised (not normalised)
1.6182e+00 (1.6173e+00 )
1.4373e+00 (1.4371e+00 )
1.5027e+00 (1.5011e+00 )
6.7895e+00 (6.7955e+00 )
Variance of the gaussian process: 70.8914
RMSE (by Leave One Out): 0.49911
Q2: 0.849842
*******************************