Welcome to pyGAM’s documentation!¶

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.
Installation¶
pyGAM is on pypi, and can be installed using pip
:
pip install pygam
Or via conda-forge
, however this is typically less up-to-date:
conda install -c conda-forge pyGAM
You can install the bleeding edge from github using flit
.
First clone the repo, cd
into the main directory and do:
pip install flit
flit 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 2.7 and 3.6 and depends on NumPy
, SciPy
, and progressbar2
(see requirements.txt
for version information).
Optional: scikit-sparse
.
In addtion to the above dependencies, the datasets
submodule relies on Pandas
.
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¶
GNU General Public License v3.0
Getting Started¶
If you’re new to pyGAM, read the Tour of pyGAM for an introduction to the package.
Contents: