Repository navigation
Refactor discrete_model to avoid duplicate digamma calls - #3592
jbrockmendel wants to merge 26 commits into
Conversation
|
I don't have any experience with appveyor. The error code in the log doesn't help me understand why it failed. Any ideas? |
|
Just a hard-to-debug issue with the state space models, not your code's fault. |
|
looks good as far as I can see from reading through the changes, formulas look unchanged I made a few comments (which I don't see right now) on smaller things, style, a1 |
| special.digamma(y + mu/alpha) - | ||
| special.digamma(mu/alpha)) | ||
| digamma_part = ( | ||
| special.digamma(y+mu/alpha) |
There was a problem hiding this comment.
cosmetic: : I don't like isolated brackets (on separate lines) unless there is a long list of items
There was a problem hiding this comment.
we follow old pep-8 with spaces around all operators, +, -, *, /, ... except ** (power)
There was a problem hiding this comment.
cosmetic: : I don't like isolated brackets (on separate lines) unless there is a long list of items
[Begrudging acquiescence]
we follow old pep-8 with spaces around all operators, +, -, *, /, ... except ** (power)
Will fix.
|
|
||
| # for dl/dalpha dalpha | ||
| digamma_part = (special.digamma(y + mu/alpha) - | ||
| special.digamma(mu/alpha)) |
There was a problem hiding this comment.
duplicate computation of mu/alpha, which is already defined as a1
| - special.digamma(mu/alpha) | ||
| ) | ||
| digamma_part = (special.digamma(y + mu / alpha) | ||
| - special.digamma(mu / alpha)) |
There was a problem hiding this comment.
align below parenthesis, unless we need more space if parenthesis is already far to the right
(next time)
|
the content looks good and ready to merge However, there is a merge of master in this branch that needs to be removed by an interactive rebase. |
…bine them outside the if/else
|
It turns out other |
|
This pull request fixes 1 alert - view on lgtm.com fixed alerts:
Comment posted by lgtm.com |
|
This pull request fixes 1 alert - view on lgtm.com fixed alerts:
Comment posted by lgtm.com |
|
14 test failures with many nans, so there is either a bug or it is numerically less stable than the old version. |
|
Rebasing is behaving... oddly. At this point I think it'll be easier to start fresh on a new branch. Closing. |
|
for checking or debugging, you can also compare analytical with numerical derivatives. from one of my recent notebooks |
Also some flake8 fixes e.g. deleting unused imports.