esem.emulator.Emulator

class esem.emulator.Emulator(model, training_params, training_data, name='', gpu=0)

A class wrapping a statistical emulator

training_data

A wrapped representation of the training data

Type

esem.wrappers.DataWrapper

model

The underlying model which performs the emulation

Type

ModelAdaptor

name

A human-readable name for the model

Type

str

__init__(model, training_params, training_data, name='', gpu=0)
Parameters
  • model (ModelAdaptor) – The (compiled but not trained) model to be wrapped

  • training_params (pd.DataFrame or array-like) – The training parameters (X)

  • training_data (esem.wrappers.DataWrapper or xarray.DataArray or iris.Cube or array-like) – The training data - the leading dimension should represent training samples (Y)

  • name (str) – Human readable name for the model

  • gpu (int) – The machine GPU to assign this model to

Methods

__init__(model, training_params, training_data)

Parameters
  • model (ModelAdaptor) – The (compiled but not trained) model to be wrapped

batch_stats(sample_points[, batch_size])

Return mean and standard deviation in model predictions over samples, without storing the intermediate predicions in memory to enable evaluating large models over more samples than could fit in memory

predict(x, *args, **kwargs)

Make a prediction using a trained emulator

train([verbose])

Train on the training data