The default choice (and that supported by other functions in this package, particularly
emulator_from_data) for the correlation structure is exponential-squared, due to the
useful properties it possesses. However, one can manually instantiate a Correlator with
a different underlying structure. Built-in alternatives are as follows, as well as whether
a form exists for its derivative:
matern
the Matérn function (derivative exists)
orn_uhl
the Ornstein-Uhlenbeck function (no derivative)
rat_quad
the rational quadratic function (derivative exists)
One more function, gamma_exp, is available but not directly supported
by emulator_from_data, for example, due to its very limited suitability to
emulating model outputs. However, this can be used as a test case for writing one's
own correlation functions and using them with emulator_from_data.
A user-defined correlation function can be provided to the Correlator: the requirements
are that the function accept data.matrix objects as its first and second arguments,
and accept a named list of hyperparameters as its third argument, and return a matrix
of correlations between rows of the data.matrices. If a derivative also
exists, it should take the same name as the correlation function with "_d" appended to
it, and the directions to differentiate with respect to should come after the
hyperparameter argument. For example, the rational quadratic functions have the form
rat_quad(x1, x2, hp = list(alpha, theta))
rat_quad_d(x1, x2, hp = list(alpha, theta), dx1, dx2)
If defining a custom correlation function, care should be taken with hyperparameter
estimation - see emulator_from_data examples for details.