Skip to content

glum 3.5.0

Latest

Choose a tag to compare

@MatthiasSchmidtblaicherQC MatthiasSchmidtblaicherQC released this 16 Nov 17:02
· 9 commits to main since this release
da41f13

3.5.0 - 2026-11-16

Bug fixes:

  • Fixed categorical_levels_ for polars Categorical columns not matching the design matrix columns. This could cause wrong predictions or errors in predict.
  • Fixed monotonic_constraints raising ValueError when a formula term contains square brackets, e.g. bs(x, knots=[15, 20, 30]).
  • Fixed monotonic_constraints not giving a monotone fitted effect when the first spline basis or categorical level is dropped, e.g. for bs() without include_intercept=True or C() with drop_first=True. Detecting the dropped bs() basis requires tabmat 4.3.0, which records spans_intercept, so the minimum tabmat version is now 4.3.0.
  • Fixed a pandas deprecation warning being emitted before the "unseen categories" ValueError when predicting on data with unseen categories.
  • Fixed the solver for monotonic_constraints comparing objective values computed with different constraint penalties in its line search. This caused spurious "Line search failed" convergence warnings and extra iterations.
  • The "Line search failed" ConvergenceWarning is no longer emitted when the loss no longer changes up to machine precision, since users cannot act on it.
  • Replaced the "Sigmoid function too close to 0 or 1. Clipping." warning of the logit and cloglog links by a warning after the final fit. The old warning was emitted for single observations and intermediate solver iterations, which users cannot act on. The new warning is only emitted if more than 1% of the fitted values are numerically 0 or 1, which typically indicates (quasi-)perfect separation (for the cloglog link, only fitted values of 0 count, because values of 1 are routine). It suggests more regularization or removing the separating features.
  • Fixed tabmat's "Input array is not contiguous; making a copy." warning being emitted for row slices of pandas data frames, e.g. df.iloc[:n], in fit, predict and score. tabmat itself no longer emits this warning after 4.3.1.
  • Fixed monotonic_constraints ordering the levels of an ordered categorical by their label (e.g. alphabetically) instead of by the category order.
  • monotonic_constraints now raises a ValueError for unordered categoricals, and for cr() and cs() splines, instead of silently failing to enforce monotonicity.

Other changes:

  • Removed scikit-learn from build dependencies.
  • Warnings are now treated as errors in the test suite and in the README doctest in CI, except in the nightly and oldies environments.
  • The documentation build now treats warnings as errors and runs in CI. Fixed the docstring formatting of cat_missing_method and get_link and several broken links in the tutorials and the changelog.
  • Require Python>=3.11, since conda-forge no longer supports Python 3.10. No Python 3.10 wheels are built or uploaded to PyPI any more.
  • Added py314 and py315 test environments, and a conda package build for Python 3.15.
  • Removed the py310 test environment and moved the oldies environment and the conda package builds from Python 3.10 to 3.11, since conda-forge no longer supports Python 3.10. The oldies pins for pandas (1.5), scikit-learn (1.1.3) and scipy (1.9) were raised to the oldest releases with Python 3.11 builds.

Full Changelog: v3.4.1...v3.5.0