diff --git a/pygam/pygam.py b/pygam/pygam.py index 6f86ae43..ceab3ef1 100644 --- a/pygam/pygam.py +++ b/pygam/pygam.py @@ -8,6 +8,7 @@ import scipy as sp from progressbar import ProgressBar from scipy import stats # noqa: F401 +from sklearn.base import BaseEstimator from pygam.callbacks import ( CALLBACKS, # noqa: F401 @@ -88,7 +89,7 @@ EPS = np.finfo(np.float64).eps # machine epsilon -class GAM(Core, MetaTermMixin): +class GAM(Core, MetaTermMixin, BaseEstimator): """Generalized Additive Model. Parameters @@ -3046,7 +3047,7 @@ def gridsearch( ) -class GammaGAM(GAM): + """Gamma GAM. This is a GAM with a Gamma error distribution, and a log link. diff --git a/pygam/tests/test_core.py b/pygam/tests/test_core.py index b3ce7537..86f7a851 100644 --- a/pygam/tests/test_core.py +++ b/pygam/tests/test_core.py @@ -1,3 +1,13 @@ +""" +Unit tests for pygam.core module. + +This file contains tests for the Core class and the nice_repr utility function, +verifying that class attributes are set correctly and that the nice_repr function +produces expected string representations. + +These tests help prevent regressions in the core utilities of pyGAM. +""" + from pygam.core import Core, nice_repr