gptools is a minimal package to publish Stan code for efficient Gaussian process inference. The package can be used with the cmdstanpy interface for Stan in Python.
- Install cmdstanpy and cmdstan if you haven't already (see here for details).
- Install gptools from PyPI by running
pip install gptools-stan
from the command line. - Compile your first model.
from cmdstanpy import CmdStanModel
from gptools.stan import get_include
model = CmdStanModel(
stan_file="path/to/your/model.stan",
stanc_options={"include-paths": get_include()},
)
For an end-to-end example, see this notebook.