glum 3.0.0
·
97 commits
to main
since this release
3.0.0 - 2024-04-27
Breaking changes:
- All arguments to :class:
~glum.GeneralizedLinearRegressorBase, :class:~glum.GeneralizedLinearRegressorand :class:~glum.GeneralizedLinearRegressorCVare now keyword-only. - All arguments to public methods of :class:
~glum.GeneralizedLinearRegressorBase, :class:~glum.GeneralizedLinearRegressoror :class:~glum.GeneralizedLinearRegressorCVexceptX,y,sample_weightandoffsetare now keyword-only. - :class:
~glum.GeneralizedLinearRegressor's default value foralphais now0, i.e. no regularization. - :class:
~glum.GammaDistribution, :class:~glum.InverseGaussianDistribution, :class:~glum.NormalDistributionand :class:~glum.PoissonDistributionno longer inherit from :class:~glum.TweedieDistribution. - The power parameter of :class:
~glum.TweedieLinkhas been renamed fromptopower, in line with :class:~glum.TweedieDistribution. - :class:
~glum.TweedieLinkno longer instantiates :class:~glum.IdentityLinkor :class:~glum.LogLinkforpower=0andpower=1, respectively. On the other hand, :class:~glum.TweedieLinkis now compatible withpower=0andpower=1.
New features:
- Added a formula interface for specifying models.
- Improved feature name handling. Feature names are now created for non-pandas input matrices too. Furthermore, the format of categorical features can be specified by the user.
- Term names are now stored in the model's attributes. This is useful for categorical features, where they refer to the whole variable, not just single levels.
- Added more options for treating missing values in categorical columns. They can either raise a
ValueError("fail"), be treated as all-zero indicators ("zero") or represented as a new category ("convert"). meth:GeneralizedLinearRegressor.wald_testcan now perform tests based on a formula string and term names.- :class:
~glum.InverseGaussianDistributiongains a :meth:~glum.InverseGaussianDistribution.log_likelihoodmethod.