Following these simple steps, the experimental section of the article "Sparse Spectrum Gaussian Processes for Regression" (submitted for review) can be easily reproduced. If you want to do that, you might also want to download the corresponding Regression datasets.
The function selects the model using training data and makes predictions
for test data. It returns the predictive mean
(mu), variance (S2), error measures on test data
NMSE (Normalized Mean Square Error) and NMLP
(Negative Mean Log Probability), selected hyperparameters
(loghyper) and convergence curve.
Notes
Training cost scales as nm². (i.e. linear in the number of inputs).
Choosing bigger values for m usually results in more accurate solutions, at a higher computational cost.
In the limit (for infinite m), the model is equivalent to a GP model with squared exponential covariance.
The starting point for the hyperparameter search is randomized. Different runs will lead to slightly different results.
Results obtained with this procedure represent a baseline. If you can provide a better initial (or final) guess for the hyperparameters, better results are expected.
The default number of iterations used for optimization is probably unnecesarily big for most problems. This is so to ensure proper convergence. You can reduce it to save time.
If you want to:
manually select the initialization point,
avoid having to reselect the model each time you use it,
Performance can be significantly improved if the spectral points are additionally learned. This doesn't increase computational cost.
In this case, the model no longer converges to a GP model with squared exponential covariance and there might be some risk of overfitting if m<<n does not hold.
To use it, proceed as above, replacing ssgprfixed_ui with ssgpr_ui.