Cross Validation

GaussianProcesses.dlogpdθ_CVfoldMethod
dlogpdθ_CVfold_kern!(∂logp∂θ::AbstractVector{<:Real}, gp::GPE, folds::Folds; 
                     noise::Bool, domean::Bool, kern::Bool)

Derivative of leave-one-out CV criterion with respect to the noise, mean and kernel hyperparameters. See Rasmussen & Williams equations 5.13.

source
GaussianProcesses.gradient_foldMethod
gradient_fold(invΣ, alpha, ZjΣinv, Zjα, V::AbstractVector{Int})

Gradient with respect to the kernel hyperparameters of the CV criterion component for one validation fold:

\[ \nabla_{\theta}\left(\log p (Y_V \mid Y_T, \theta) \right)\]

where Y_V is the validation set and Y_T is the training set (all other observations) for this fold.

source
GaussianProcesses.logp_LOOMethod
logp_LOO(gp::GPE)

Leave-one-out log probability CV criterion. This is implemented by summing the normal log-pdf of each observation with predictive LOO mean and variance parameters obtained by the predict_LOO function.

See also: logp_CVfold, update_mll!

source
GaussianProcesses.predict_CVfoldMethod
predict_CVfold(gp::GPE, folds::Folds)

Cross-validated predictions for arbitrary folds. A fold is a set of indices of the validation set. Returns predictions of yV (validation set) given all other observations yT (training set), as a vector of means and covariances. Using the notation from Rasmussen & Williams, see e.g. equation 5.12: σᵢ = 𝕍 (yᵢ | y₋ᵢ)^(1/2) μᵢ = 𝔼 (yᵢ | y₋ᵢ)

The output is the same as fitting the GP on xT,yT, and calling predict_f on x_V to obtain the LOO predictive mean and covariance, repeated for each fold V. With GPs, this can thankfully be done analytically with a bit of linear algebra, which is what this function implements.

See also: predict_LOO

source
GaussianProcesses.predict_LOOMethod
predict_LOO(gp::GPE)

Leave-one-out cross-validated predictions. Returns predictions of yᵢ given all other observations y₋ᵢ, as a vector of means and variances. Using the notation from Rasmussen & Williams, see e.g. equation 5.12: σᵢ = 𝕍 (yᵢ | y₋ᵢ)^(1/2) μᵢ = 𝔼 (yᵢ | y₋ᵢ)

The output is the same as fitting the GP on x₋ᵢ,y₋ᵢ, and calling predict_f on xᵢ to obtain the LOO predictive mean and variance, repeated for each observation i. With GPs, this can thankfully be done analytically with a bit of linear algebra, which is what this function implements.

See also: predict_CVfold, logp_LOO

source