-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Default moment
for CustomDist
provided with a dist
function
#6873
Merged
ricardoV94
merged 41 commits into
pymc-devs:main
from
aerubanov:customdist-default-moment
Nov 13, 2023
Merged
Changes from 35 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
030824e
add test for custom dist default moment
aerubanov cdbe6f8
add graph rewriting
aerubanov af82efc
add graph rewrite
aerubanov c12da7e
change test case
aerubanov b570fb6
remove commented code
aerubanov ea22848
add more test cases
aerubanov 06c2646
replace Distribution by RandomVariable in node input check
aerubanov 511f0f6
Update pymc/distributions/distribution.py
aerubanov 9a4a801
add test case for dist with inner graph
aerubanov 10ba63d
add extra test case and change apply method
aerubanov f078665
change inner graph moment replacement
aerubanov cee024d
remove comented code
aerubanov 6e84d62
add initial implementation of scan op replacement
aerubanov aa8fce9
fix errors
aerubanov 716f1f8
change test
aerubanov 62b3c59
change normal ditribution by uniform in step func
aerubanov 875e2ed
add test case for nested dist
aerubanov e1b0f66
remove unused and commented code
aerubanov 3c30352
change conditions order
aerubanov c017195
remove comment
aerubanov 6cb03f1
add helper function
aerubanov 1b60994
add helper function for graph construction
aerubanov 0656987
Update pymc/distributions/distribution.py
aerubanov 155e44b
fix function name and imports
aerubanov 097a057
transform scan rewrite function into method of MomentRewrite
aerubanov 2647993
add check for no replacements needed
aerubanov a0ae812
fix method arguments
aerubanov ef7a7a0
change fgraph construction
aerubanov 3004799
remove rv creation
aerubanov 6b7c11b
remove commented code
aerubanov 9db17f6
add comments
aerubanov b3548cb
Update tests/distributions/test_distribution.py
aerubanov 20e066c
move dist_moment function outside of dist method
aerubanov db49e97
add new test case
aerubanov 80c6b02
add changes from review
aerubanov ba00b38
remove filter_RNGs function
aerubanov a3c9f14
remove moment from dist method
aerubanov ed5a3c7
register moment fn
aerubanov 9ec33c6
Update pymc/distributions/distribution.py
aerubanov d5899d4
fix moment arguments
aerubanov 9b3c43d
remove separate var for op
aerubanov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Since this ended up not being needed let's just inline it in the custom moment function