pyGAM icon indicating copy to clipboard operation
pyGAM copied to clipboard

Fix LogitLink.mu numerical instability (#534)

Open hritikkumarpradhan opened this issue 8 months ago • 0 comments

Fixes #534. Replaced naive np.exp logic with scipy.special.expit to prevent NaN predictions for large linear predictors. Added soft-clipping to LogitLink.gradient to prevent division by zero. Added test coverage for numerical stability.

hritikkumarpradhan avatar Mar 16 '26 17:03 hritikkumarpradhan