Train a Sparse GP Surrogate via Random Fourier Features
Source:R/RcppExports.R
train_rff_surrogate.RdApproximates the RBF kernel GP using random Fourier features, reducing training cost from O(n^3) to O(n * D^2) where D is the number of random features (typically 100-500). This enables GP surrogates for ensembles of 1,000+ realisations.
Usage
train_rff_surrogate(
X_train,
Y_train,
n_features = 200L,
length_scale = 0,
noise_var = 1e-04
)Details
The RBF kernel k(x,x') = sigma^2 exp(-||x-x'||^2 / 2l^2) is approximated by k(x,x') ~ z(x)^T z(x') where z(x) = sqrt(2/D) * cos(Wx + b), where W are random frequencies. with w_j ~ N(0, I/l^2) and b_j ~ Uniform(0, 2pi).