pymc.gp.approx_hsgp_periodic_m#

pymc.gp.approx_hsgp_periodic_m(lengthscale_min)[source]#

Use heuristics to recommend a minimum m for HSGPPeriodic, based on Riutort-Mayol et. al.

Smaller lengthscales need more basis vectors. Use your prior on the lengthscale of the Periodic kernel as guidance, and pass in the smallest lengthscale you expect. There is no boundary factor c because the periodic basis does not depend on the range of X.

The recommendation is m = ceil(1.86 / lengthscale_min) + 1. This is the rule J >= 3.72 / ell from Appendix B of Riutort-Mayol et al. converted to the Periodic kernel’s lengthscale convention, which is half of theirs. One is added because m also counts the constant term.

Parameters:
lengthscale_minfloat

The smallest lengthscale of the Periodic kernel you expect.

Returns:
- `m`int

Number of basis vectors. Increasing it helps approximate smaller lengthscales, but increases computational cost.

Raises:
ValueError

If lengthscale_min is not positive.

References

  • Riutort-Mayol, G., Anderson, M., Solin, A., Vehtari, A. (2022).

Practical Hilbert Space Approximate Bayesian Gaussian Processes for Probabilistic Programming