Skip to content
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

Logprob derivation of Max for Discrete IID distributions #6790

Merged
merged 9 commits into from
Oct 24, 2023

Conversation

Dhruvanshu-Joshi
Copy link
Member

@Dhruvanshu-Joshi Dhruvanshu-Joshi commented Jun 22, 2023

What is this PR about?
This PR is the extension of PR #6769 and aims to provide a solution for implementing the Max operation for discrete distributions from order statistics to solve the issue #6350 and issue #6773.

Checklist

Major / Breaking Changes

  • ...

New features

  • Logprob derivation for pt.max on Discrete distributions. The formula for maxima differs for both continuous and discrete distributions.

Bugfixes

  • ...

Documentation

  • ...

Maintenance

  • ...

📚 Documentation preview 📚: https://pymc--6790.org.readthedocs.build/en/6790/

@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Merging #6790 (894ff27) into main (c3f93ba) will decrease coverage by 9.66%.
The diff coverage is 35.71%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6790      +/-   ##
==========================================
- Coverage   92.07%   82.41%   -9.66%     
==========================================
  Files         100      100              
  Lines       16875    16886      +11     
==========================================
- Hits        15538    13917    -1621     
- Misses       1337     2969    +1632     
Files Coverage Δ
pymc/logprob/order.py 31.77% <35.71%> (-63.02%) ⬇️

... and 38 files with indirect coverage changes

@ricardoV94 ricardoV94 changed the title logprob derivation of Max for Discrete distributions Logprob derivation of Max for Discrete distributions Jul 17, 2023
@ricardoV94 ricardoV94 marked this pull request as ready for review July 17, 2023 14:12
ricardoV94
ricardoV94 previously approved these changes Jul 17, 2023
@Dhruvanshu-Joshi
Copy link
Member Author

@ricardoV94 @larryshamalama I have updated this branch as per latest modifications and also modified it to support Discrete distributions. Now we need tests to support discrete distribution! 🙂

pymc/logprob/order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Outdated Show resolved Hide resolved
tests/logprob/test_order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Show resolved Hide resolved
pymc/logprob/order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Outdated Show resolved Hide resolved
pymc/logprob/order.py Show resolved Hide resolved
@Dhruvanshu-Joshi
Copy link
Member Author

Hey @ricardoV94 @larryshamalama . I have added the changes and this branch seems good to merge.

@ricardoV94 ricardoV94 changed the title Logprob derivation of Max for Discrete distributions Logprob derivation of Max for Discrete IID distributions Oct 17, 2023
pymc/logprob/order.py Outdated Show resolved Hide resolved
Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rerun when the PyTensor fix gets through, but LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants