diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6e4702cd..6503dda9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,7 +7,15 @@ Changelog ========= -3.1.0 - unreleased +3.1.1 - unreleased +------------------ + +**Bug fix: + +- Fixed a bug where `TweedieDistribution._rowwise_gradient_hessian` would pass `p` paramter to `inv_gaussian_log_rowwise_gradient_hessian`, even though `p` is not defined in its function signature. + + +3.1.0 ------------------ **New features:** diff --git a/src/glum/_distribution.py b/src/glum/_distribution.py index 2b6104df..58ac99a5 100644 --- a/src/glum/_distribution.py +++ b/src/glum/_distribution.py @@ -672,7 +672,7 @@ def _rowwise_gradient_hessian( elif 1 < self.power < 2 and isinstance(link, LogLink): f = partial(tweedie_log_rowwise_gradient_hessian, p=self.power) elif self.power == 3: - f = partial(inv_gaussian_log_rowwise_gradient_hessian, p=self.power) + f = inv_gaussian_log_rowwise_gradient_hessian if f is not None: return f(y, sample_weight, eta, mu, gradient_rows, hessian_rows) @@ -703,7 +703,7 @@ def _eta_mu_deviance( elif 1 < self.power < 2 and isinstance(link, LogLink): f = partial(tweedie_log_eta_mu_deviance, p=self.power) elif self.power == 3 and isinstance(link, LogLink): - f = partial(inv_gaussian_log_eta_mu_deviance, p=self.power) + f = inv_gaussian_log_eta_mu_deviance if f is not None: return f(cur_eta, X_dot_d, y, sample_weight, eta_out, mu_out, factor)