PyGAM Versions Save

[HELP REQUESTED] Generalized Additive Models in Python

v0.9.1

2 months ago

New Behavior

  • test and support python 3.8, 3.9, 3.10, 3.11, and 3.12

Bug Fixes

v0.9.0

1 year ago

New Features

  • move to Poetry for dependency management
  • use flake8 + black for linting

Bug Fixes:

  • use int instead of np.int

Breaking changes

  • remove support for python 2

v0.8.0

5 years ago

New Features

  • cyclic p-splines: you can now train models with periodic features by using the 'cp' basis like so:
GAM(s(0, basis='cp'))
  • factor smooths now allow dummy coding, via:
GAM(f(0, coding='dummy'))

Models using this coding scheme are more statistically interpretable , and computationally less expensive than those using one-hot encodings.

Bug Fixes

  • models can mix constrained terms and un-constrained tensor-terms
  • tensor terms can be constrained

v0.7.2

5 years ago

Bug Fixes

  • Fix not None element existance judgement bug in terms.py thanks @BeefOnionDumplings !
  • Added a warning issued in summary indicating that there is likely a bug in the p-values

v0.7.1

5 years ago

Bug Fixes

  • fixed bug where np.int64 did not count as integers. the following no longer fails:
LinearGAM().gridsearch(X, y, n_splines=np.arange(5, 10)).summary()

v0.7.0

5 years ago

New Features

  • Documentation!!!

Bug Fixes

  • removed WIP method randomsearch

v0.6.3

5 years ago

New Features

  • gridsearch(...) allows searching across a predefined grid of points, without doing the cartesian product, when grid is a np.ndarray of shape (n_points, len(flatten(gam.lam))). This is useful for RandomSearchCV - style behavior.

Bug Fixes

  • estimate_r_squared(X, y) no longer raises AttributeError
  • dtype=auto no longer allowed for terms
  • intercept.lam = None

v0.6.1

5 years ago

New Features

  • easier global arguments for terms
GAM(s(0) + s(1), n_splines=10).fit(X, y)

will broadcast n_splines=10 to all terms

Bug Fixes

  • fixed inconsistencies in GAM instatiation, where
GAM(lam=0.6).gridsearch(X, y)

worked for multi-dimensional X

but not

GAM(lam=0.6).gridsearch(X, y)

0.6.0

5 years ago

New Features

  • tensor product terms and feature interactions. On top of that, construction is more precise and less verbose:
GAM(te(0, s(1, n_splines=5))).fit(X, y)
  • the partial_dependence() method can return meshgrids to help you make 3D plots of interaction terms
  • ExpectileGAM: for creating a non-parametric description of a distribution. Instead of just modeling the mean of a response, we can model any quantile using
ExpectileGAM().fit_quantile(X, y, quantile=0.25) 

Breaking Changes

  • GAM construction is different but much simpler. check out the docstrings for help.
  • generate_X_grid and partial_dependence methods require you to specify term= instead of ~feature=~

v0.5.5

5 years ago

New Featrues

  • all GAM classes have a verbose argument. this makes them compatible with sklearn GridsearchCV + RandomizedsearchCV
  • add toy_classification dataset
  • move generate_X_grid to GAM method

Bug Fixes

  • users should get a more pythonic experience with partial_dependence by never needing to index with i+1
  • _initial_estimate() method no longer fails on value nudge for purely integer observations
  • regenerate images
  • bugs in readme
  • fixes bug where poorly conditioned matrix would fail when using skcholmod
  • make2d should not be verbose in initial_estimate()