AbstractGPs.jl is a package that defines a low-level API for working with Gaussian processes (GPs), and basic functionality for working with them in the simplest cases. As such it is aimed more at developers and researchers who are interested in using it as a building block than end-users of GPs.
AbstractGPs is an officially registered Julia package, so the following will install AbstractGPs using the Julia's package manager:
] add AbstractGPs
# Import packages. using AbstractGPs, Plots # Generate toy synthetic data. X = rand(10) Y = sin.(rand(10)) # Define GP prior with Matern32 kernel f = GP(Matern32Kernel()) # Finite projection at the inputs `X` fx = f(X, 0.001) # Data's log-likelihood w.r.t prior GP `f`. logpdf(fx, Y) # Exact posterior given `Y`. p_fx = posterior(fx, Y) # Data's log-likelihood w.r.t posterior GP `p_fx`. logpdf(p_fx(X), Y) # Plot posterior. scatter(X, Y; label="Data") plot!(-0.5:0.001:1.5, p_fx; label="Posterior")
Related Julia packages
- AbstractGPsMakie.jl - Plotting GPs with Makie.jl.
- BayesianLinearRegressors.jl - Accelerated inference in GPs with a linear kernel. Built on types which implement this package's APIs.
- GPLikelihoods.jl - Non-Gaussian likelihood functions to use with GPs.
- KernelFunctions.jl - Kernel functions for machine learning.
- Stheno.jl - Building probabilistic programmes involving GPs. Built on types which implement this package's APIs.
- TemporalGPs.jl - Accelerated inference in GPs involving time. Built on types which implement this package's APIs.
If you notice a problem or would like to contribute by adding more kernel functions or features please submit an issue.