forked from pyro-ppl/numpyro
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ZeroSumNormal distribution (pyro-ppl#1751)
* added zerosumnormal and tests * added edge case handling for support shape * removed commented out functions * added zerosumnormal to docs * fixed zerosumnormal support shape default * Added v1 of docstrings for zerosumnormal * updated zsn docstring * improved init shape handling for zerosumnormal * improved docstrings * added ZeroSumTransform * made n_zerosum_axes an attribute for the zerosumtransform * removed commented out lines * added zerosumtransform class * switched zsn from ParameterFreeTransform to Transform * changed ZeroSumNormal to transformed distibutrion * changed input to tuple for _transform_to_zero_sum * added forward and inverse shape to transform, fixed zero_sum constraint handling * fixed failing zsn tests * added docstring, removed whitespace, fixed missing import * fixed allclose to be assert allclose * linted and formatted * added sample code to docstring for zsn * updated docstring * removed list from ZeroSum constraint call * removed unneeded iteration, updated docstring * updated constraint code * added ZeroSumTransform to docs * fixed transform shapes * added doctest example for zsn * added constraint test * added zero_sum constraint to docs * added type hinting to transforms file * fixed docs formatting * moved skip zsn from test_gof earlier * reversed zerosumtransform * broadcasted mean and var of zsn * added stricter zero_sum constraint tol, improved mean and var functions * fixed _transform_to_zero_sum * removed shape promote from zsn, changed broadcast to zeros_like * chose better zsn test cases * Update zero_sum constraint feasible_like Co-authored-by: Till Hoffmann <[email protected]> * fixed docstring for doctests --------- Co-authored-by: Till Hoffmann <[email protected]>
- Loading branch information
1 parent
6140916
commit 6e61a14
Showing
8 changed files
with
259 additions
and
1 deletion.
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
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
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.