emukit.core.interfaces package¶
Submodules¶
- class emukit.core.interfaces.models.IModel¶
Bases:
object
- predict(X)¶
Predict mean and variance values for given points
- Parameters
X (
ndarray
) – array of shape (n_points x n_inputs) of points to run prediction for- Return type
Tuple
[ndarray
,ndarray
]- Returns
Tuple of mean and variance which are 2d arrays of shape (n_points x n_outputs)
- set_data(X, Y)¶
Sets training data in model
- Parameters
X (
ndarray
) – new pointsY (
ndarray
) – function values at new points X
- Return type
- property X¶
- property Y¶
- class emukit.core.interfaces.models.IJointlyDifferentiable¶
Bases:
object
- predict_with_full_covariance(X)¶
- Parameters
X (
ndarray
) – (n_points x n_dimensions) array containing locations at which to get predictions- Return type
Tuple
[ndarray
,ndarray
]- Returns
(mean, variance) Arrays of size n_points x 1 and n_points x n_points of the predictive mean and variance at each input location
- get_joint_prediction_gradients(X)¶
Computes and returns model gradients of mean and full covariance matrix at given points
- Parameters
X (
ndarray
) – points to compute gradients at, nd array of shape (q, d)- Return type
Tuple
[ndarray
,ndarray
]- Returns
Tuple with first item being gradient of the mean of shape (q) at X with respect to X (return shape is (q, q, d)). The second item is the gradient of the full covariance matrix of shape (q, q) at X with respect to X (return shape is (q, q, q, d)).
- class emukit.core.interfaces.models.IPriorHyperparameters¶
Bases:
object
- generate_hyperparameters_samples(n_samples, n_burnin, subsample_interval, step_size, leapfrog_steps)¶
Generates the samples from the hyper-parameters of the model, and returns them.
- Parameters
n_samples (
int
) – Number of hyper-parameter samplesn_burnin (
int
) – Number of initial samples not used.subsample_interval (
int
) – Interval of subsampling from HMC samples.step_size (
float
) – Size of the gradient steps in the HMC sampler.leapfrog_steps (
int
) – Number of gradient steps before each Metropolis Hasting step.
- Return type
ndarray
- class emukit.core.interfaces.models.IModelWithNoise¶
Bases:
object
- predict_noiseless(X)¶
For given points X, predict mean and variance of the output without observation noise.
- Parameters
X (
ndarray
) – array of shape (n_points x n_inputs) of points to run prediction for- Return type
Tuple
[ndarray
,ndarray
]- Returns
Tuple of mean and variance which are 2d arrays of shape (n_points x n_outputs)