rapid_models.gp_diagnostics.metrics
Module Contents
Functions

Compute a set of evaluation metrics for GP regression with noiseless (noise_variance = 0) or fixed variance iid Gaussian noise. 

This is called by evaluate_GP() with the appropriate Cholesky factor: LL^T = K + np.eye(K.shape[0])*noise_variance 

Compute log probability of the data Y under an unbiased Gaussian with covariance L*L^T 
Compute log probability of the data Y under an unbiased standard Gaussian 
 rapid_models.gp_diagnostics.metrics.evaluate_GP(K, Y_train, folds=None, noise_variance=0, check_args=True)[source]
Compute a set of evaluation metrics for GP regression with noiseless (noise_variance = 0) or fixed variance iid Gaussian noise.
Specify the list ‘folds’ of indices for multifold crossvalidation (see documentation for cv.multifold), otherwise leaveoneout is assumed.
 Parameters
K (2d array) – GP prior covariance matrix
Y_train (array) – training observations
folds (list of lists) – The index subsets for multifold crossvalidation. Folds = None > Leaveoneout
noise_variance – variance of the observational noise. Set noise_variance = 0 for noiseless observations
check_args (bool) – Check (assert) that arguments are wellspecified before computation
 Returns: a dict containing
log_marginal_likelihood: The log probability of Y_train log_pseudo_likelihood: The log ‘pseudo’ likelihood is the sum of the log probabilities of each observation during crossvalidation in the standard normal space RMSE: The root mean squared error obtained by using the GP posterior mean as a deterministic prediction
(The residuals are also returned, for plotting and to check for normality) residuals_mean: Mean of CV residuals residuals_var: Variance of CV residuals residuals_transformed: The residuals transformed to the standard normal space
 rapid_models.gp_diagnostics.metrics.evaluate_GP_cholesky(L, Y_train, folds=None, check_args=True)[source]
This is called by evaluate_GP() with the appropriate Cholesky factor: LL^T = K + np.eye(K.shape[0])*noise_variance