Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Data Science
  3. pyGAM

pyGAM

Apache-2.0Pythonv0.12.0

A Python library for building Generalized Additive Models (GAMs) with a scikit-learn-like API, emphasizing interpretability and performance.

Visit WebsiteGitHubGitHub
997 stars289 forks0 contributors

What is pyGAM?

pyGAM is a Python library for building Generalized Additive Models (GAMs), which are smooth semi-parametric models that extend generalized linear models by allowing non-linear functions of features while maintaining additivity. It solves the problem of modeling complex, non-linear relationships in data while preserving model interpretability, using penalized B-splines to automatically capture these patterns.

Target Audience

Data scientists, statisticians, and machine learning practitioners who need interpretable models for regression and classification tasks, particularly those familiar with scikit-learn or scipy.

Value Proposition

Developers choose pyGAM for its balance of flexibility and interpretability, offering a scikit-learn-like API that simplifies building GAMs while providing performance optimizations and the ability to incorporate prior knowledge and control overfitting.

Overview

[CONTRIBUTORS WELCOME] Generalized Additive Models in Python

Use Cases

Best For

  • Building interpretable machine learning models where understanding feature effects is crucial
  • Modeling non-linear relationships in data without manual feature engineering
  • Statistical analysis requiring semi-parametric regression techniques
  • Educational purposes for learning about Generalized Additive Models in Python
  • Research projects needing flexible yet controlled model specification
  • Integrating GAMs into existing scikit-learn-based machine learning pipelines

Not Ideal For

  • Applications requiring modeling of complex feature interactions, as GAMs are additive and may not capture multiplicative effects well.
  • Real-time prediction systems with strict latency constraints, due to computational overhead in fitting penalized splines.
  • Projects needing a wide variety of machine learning algorithms beyond GAMs, such as ensemble methods or deep learning.

Pros & Cons

Pros

Scikit-learn-like API

Designed for ease of use with a familiar interface for users of scikit-learn or scipy, facilitating seamless integration into existing Python ML workflows, as stated in the README.

Automatic Non-linear Modeling

Uses penalized B-splines to automatically capture non-linear relationships without manual feature transformations, reducing engineering effort, as highlighted in the key features.

Interpretable Additive Structure

Maintains additivity to examine individual predictor effects while holding others constant, making it ideal for statistical analysis where transparency is crucial.

Performance Optimizations

Optimized for speed with support for acceleration via Intel MKL, as mentioned in the installation section, though setup requires careful configuration.

Cons

Complex Acceleration Setup

Installation with Intel MKL for optimal performance is described as tricky, requiring third-party builds or careful Conda channel management, which can hinder usability.

Limited Algorithm Scope

Focuses solely on Generalized Additive Models, lacking the breadth of algorithms in comprehensive libraries like scikit-learn, which may not suit diverse modeling needs.

Potential API Instability

As a version 0.x package, pyGAM may undergo breaking changes, as indicated by the release notes link, posing risks for long-term project maintenance.

Frequently Asked Questions

Quick Stats

Stars997
Forks289
Contributors0
Open Issues120
Last commit12 days ago
CreatedSince 2017

Tags

#scientific-computing#data-science#interpretable-ai#python#interpretable-ml#scikit-learn-api#statistical-modeling#explainable-ai#machine-learning#explainable-ml

Built With

P
Python

Links & Resources

Website

Included in

Data Science28.8kData Science3.4k
Auto-fetched 20 hours ago

Related Projects

JAXJAX

Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more

Stars35,533
Forks3,559
Last commit1 day ago
XGBoostXGBoost

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

Stars28,334
Forks8,870
Last commit3 days ago
LightGBMLightGBM

A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.

Stars18,314
Forks4,010
Last commit1 day ago
DLIBDLIB

A toolkit for making real world machine learning and data analysis applications in C++

Stars14,372
Forks3,454
Last commit8 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub