esem.gp_model¶
- esem.gp_model(training_params, training_data, data_processors=None, kernel=None, kernel_op='add', active_dims=None, noise_variance=1.0, name='', gpu=0, **kwargs)¶
Create a Gaussian process (GP) based emulator with provided training_params (X) and training_data (Y) which assumes independent inputs (and outputs).
The kernel is a key parameter in GP emulation and care should be taken in choosing it.
- Parameters
training_params (
DataFrame
) – The training parameterstraining_data (
xarray.DataArray
oriris.Cube
or array_like) – The training data - the leading dimension should represent training samplesdata_processors (
list
ofesem.data_processors.DataProcessor
) – A list of ‘DataProcessor` to apply to the data transparently before training. Model output will be un-transformed before being returned from the Emulator.kernel (
gpflow.kernels.Kernel
orlist
ofstr
orNone
) – The GP kernel to use. A GPFlow kernel can be specified directly, or a list of kernel names can be provided which will be initialised using the default values (of the correct shape) and combined using kernel_op. Alternatively no kernel can be specified and a default will be used.kernel_op (
{'add', 'mul'}
) – The operation to perform in order to combine the specified kernel`s. Only used if `kernel is a list of strings.noise_variance (
float
) – The noise variance to initialise the GP regression modelactive_dims (
list
ofint
orslice
orNone
) – The dimensions to train the GP over (by default all of the dimensions are used)name (
str
) – An optional name for the emulatorgpu (
int
) – The GPU to use (only applicable for multi-GPU) machineskwargs (
dict
) – Dict of optional keyword arguments for gpflow.models.GPR, e.g., mean_function
- Returns
Emulator
– An esem emulator object which can be trained and sampled from