-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow censoring Categorical distributions #7662
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7662 +/- ##
==========================================
- Coverage 92.78% 92.71% -0.08%
==========================================
Files 107 107
Lines 18196 18400 +204
==========================================
+ Hits 16884 17059 +175
- Misses 1312 1341 +29
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test for the logcdf
?
res = pt.switch( | ||
def logp(value, p): | ||
k = pt.shape(p)[-1] | ||
value, safe_value_p = Categorical._safe_index_value_p(value, p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love making _safe_index_value_p
a method. What's the conceptual advantage vs just being a function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't clutter the namespace, that's the only difference
I did... it's in the Censored. Since there is no Categorical scipy distribution, I would just be comparing two implementations written by me? |
Ah, I tested the logp... hmm okay okay |
a3cbfee
to
60c763f
Compare
Reported missing functionality in https://discourse.pymc.io/t/how-to-setup-a-censored-orderedlogistic-model/16451
📚 Documentation preview 📚: https://pymc--7662.org.readthedocs.build/en/7662/