Introduction
Gumbi simplifies the steps needed to build a Gaussian Process model from tabular data. It takes care of shaping, transforming, and standardizing data as necessary while applying best practices and sensible defaults to the construction of the GP model itself. Taking inspiration from popular packages such as Bambi and Seaborn, Gumbi’s aim is to allow quick iteration on both model structure and prediction visualization. Gumbi is primarily built on top of Pymc, though additional support for GPflow is planned.
Quickstart
Read in some data and store it as a Gumbi DataSet
:
[1]:
import gumbi as gmb
import seaborn as sns
cars = sns.load_dataset('mpg').dropna()
ds = gmb.DataSet(cars, outputs=['mpg', 'acceleration'], log_vars=['mpg', 'acceleration', 'horsepower'])
WARNING (pytensor.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
Create a Gumbi GP
object and fit a model that predicts mpg from horsepower:
[2]:
gp = gmb.GP(ds)
gp.fit(outputs=['mpg'], continuous_dims=['horsepower']);
Make predictions and plot!
[3]:
X = gp.prepare_grid()
y = gp.predict_grid()
gmb.ParrayPlotter(X, y).plot()
[3]:
<Axes: xlabel='horsepower', ylabel='mpg'>
More complex GPs are also possible, such as correlated multi-input and multi-output systems, demonstrated in the example notebooks.
Installation
Via pip
pip install gumbi
Bleeding edge
pip install git+git://github.com/JohnGoertz/Gumbi.git@develop
Local development
Clone the repo and navigate to the new directory
git clone https://gitlab.com/JohnGoertz/gumbi gumbi
cd gumbi
Create a new conda environment using mamba
conda install mamba
mamba install -f gumbi_env.yaml
Install
gumbi
viapip
in editable/development modeFrom within the
gumbi
repopip install --editable ./
To update the
gumbi
moduleFrom within the
gumbi
repogit pull