Repository navigation
Conversation
|
Hello @bzheng06! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
|
I was testing out the change mentioned in this comment: #9234 (comment) It seemed to fix our issue with 'inf' appearing in our loglikelihood results but also caused the test 'test_tweedie_loglike_obs' in test_family.py to fail. From examining the outputs of the current version of the code vs the new version (the change I made in this PR), the outputs of pdf() are the same, as well as tweedie.loglike_obs(). However, the results from integrate.quad(pdf, 0, 1e2)[0] are different, causing the test cases to fail. Could you provide some insight as to why that is? |
|
Which test is failing? |
|
AFAICS, this needs a scipy version check or |
|
log_write_bessel has |
Rebase of statsmodels#9320 closes statsmodels#9320 closes statsmodels#9234
NumPy's guide.
Details
Tweedie's loglike_obs function currently overflows in some cases with the scipy wright_bessel function. As of scipy version 1.14.0, log_wright_bessel has been released which fixes the overflow issues. Added a test case for the new loglike_obs function with a case where wright_bessel caused overflow to verify that the new function solves the issue. (link: https://github.com//issues/9234)Notes:
needed for doc changes.
then show that it is fixed with the new code.
verify you changes are well formatted by running
flake8is installed. This command is also available on Windowsusing the Windows System for Linux once
flake8is installed in thelocal Linux environment. While passing this test is not required, it is good practice and it help
improve code quality in
statsmodels.