13.7.12. Macro “modelerbuildSimpleGPEstim.py”
13.7.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.7.12.2. Macro Uranie
"""
Example of Gaussian Process building with estimation on another dataset
"""
from URANIE import DataServer, Modeler, Relauncher
# Load observations
tdsObs = DataServer.TDataServer("tdsObs", "observations")
tdsObs.fileDataRead("utf_4D_train.dat")
# Construct the GPBuilder
gpb = Modeler.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 optim iterations
# Construct the kriging model
krig = gpb.buildGP()
# Display model information
krig.printLog()
# Load the data to estimate
tdsEstim = DataServer.TDataServer("tdsEstim", "estimations")
tdsEstim.fileDataRead("utf_4D_test.dat")
# Construction of the launcher
lanceur = Relauncher.TLauncher2(tdsEstim, # data to estimate
krig, # model used
"x1:x2:x3:x4", # list of the input variables
"yEstim:vEstim") # name of model's outputs
# Launch the estimations
lanceur.solverLoop()
# Display some results
tdsEstim.draw("yEstim:y")
13.7.12.3. Graph
Figure 13.43 Graph of the macro “modelerbuildSimpleGPEstim.py”