Explore the pyGAM API Reference
mainThe pyGAM API is organized into several core modules that handle different aspects of Generalized Additive Models (GAMs). To build or extend models, you will primarily interact with these modules:
pygam.pygam: The main entry point containing theGAMclass for model fitting and prediction.pygam.terms: Defines the basis functions and terms (e.g., splines) used to model relationships between features and the target.pygam.distributions: Contains the error distributions (e.g., Normal, Poisson, Binomial) for the response variable.pygam.links: Provides link functions to connect the linear predictor to the mean of the distribution.pygam.penalties: Defines the penalty functions used for regularization (smoothing).pygam.callbacks: Provides mechanisms for monitoring or modifying the fitting process during optimization.