Welcome to pyGAM’s documentation!#

pyGAM logo

Build Status Documentation Status Coverage PyPi Version Python Versions Zenodo Open Source


Getting Started#

pyGAM is a package for building Generalized Additive Models in Python, with an emphasis on modularity and performance. The API will be immediately familiar to anyone with experience of scikit-learn or scipy.

If you’re new to pyGAM, take a Tour of pyGAM for an introduction to the package.


Installation#

Pip#

pyGAM is on pypi, and can be installed using pip:

pip install pygam

Conda#

Or via conda-forge, however this is typically less up-to-date:

conda install -c conda-forge pyGAM

Bleeding Edge#

You can install the bleeding edge from github using pip. First clone the repo, cd into the main directory and do:

pip install .  # for an unstable "latest" dev version install
# or
pip install -e .  # for an editable developer/contributor install

Optional#

To speed up optimization on large models with constraints, it helps to have scikit-sparse installed because it contains a slightly faster, sparse version of Cholesky factorization. The import from scikit-sparse references nose, so you’ll need that too.

The easiest way is to use Conda:

conda install -c conda-forge scikit-sparse nose

More information is available in the scikit-sparse docs.


Dependencies#

pyGAM is tested on Python 3.10+ and depends on NumPy, SciPy, and progressbar2.

In addition to the above dependencies, the pygam.datasets submodule relies on Pandas.

See pyproject.toml for detailed version information).


Citing pyGAM#

Servén D., Brummitt C. (2018). pyGAM: Generalized Additive Models in Python. Zenodo. DOI: 10.5281/zenodo.1208723


Contact#

To report an issue with pyGAM please use the issue tracker.


License#

Apache Software License 2.0


Quick Start#


Tour of pyGAM#


User API#


Indices and tables#

Index