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

gh-1806: Implementation of Doubly Truncated Power Law and Lower Truncated Power Law #1807

Merged
merged 33 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
febd260
implementation of DoublyTruncatedPowerLaw
Qazalbash May 30, 2024
dbb0d62
implementation of LowerTruncatedPowerLaw
Qazalbash May 30, 2024
7985364
chore: mathematical description in docstrings
Qazalbash Jun 23, 2024
2fae5e9
chore: mathematical details of `LowerTruncatedPowerLaw`
Qazalbash Jun 23, 2024
63da106
chore: Fix bug in DoublyTruncatedPowerLaw cdf and icdf calculation
Qazalbash Jun 24, 2024
10d8006
chore: Refactor mean and variance calculation by using kth-moment in …
Qazalbash Jun 24, 2024
d7d6c7e
chore: Refactor mean and variance calculation in LowerTruncatedPowerLaw
Qazalbash Jun 24, 2024
36cce79
chore: masking in icdf of LowerTruncatedPowerLaw
Qazalbash Jun 24, 2024
d8eb1e5
chore: entropy of LowerTruncatedPowerLaw
Qazalbash Jun 24, 2024
1192ca7
chore: `lax.sqaure` replaced with `jnp.sqaure`
Qazalbash Jul 6, 2024
0e4d35f
chore: moments and entropy were extra and removed
Qazalbash Jul 12, 2024
6fb9536
chore: unit tests
Qazalbash Jul 13, 2024
6743dde
fix: nan gradients fixed, values still diverging
Qazalbash Jul 13, 2024
a88c331
Updated UpperTruncatedPowerLaw with adequate derivations, including f…
InfinityMod Aug 15, 2024
b2db5f8
Changed constrains of alpha of LowerTruncatedPowerLaw to the smaller …
InfinityMod Aug 15, 2024
12d78f3
chore: code and docstring formated
Qazalbash Aug 17, 2024
2e8e33e
chore: equation refactor and simplified
Qazalbash Aug 18, 2024
ce3c53f
chore: equation refactor and simplified
Qazalbash Aug 18, 2024
aba947b
chore: use numpy arrays and numpy constants
Qazalbash Sep 5, 2024
96d5f6c
chore: high precision computation enable for powerlaws
Qazalbash Sep 5, 2024
bee7535
Merge branch 'master' into powerlaw-dist
Qazalbash Sep 5, 2024
cc3f81e
chore: `__name__` attribute calls removed
Qazalbash Sep 5, 2024
ef2a1f3
Merge branch 'master' into powerlaw-dist
Qazalbash Sep 5, 2024
3df15f2
chore: powerlaws shifted with truncated distributions
Qazalbash Sep 5, 2024
465253c
chore: spelling mistakes fixed with code spell checker pre-commit hook
Qazalbash Sep 5, 2024
0589bea
fix typo: perforance->perforamce->performance
Qazalbash Sep 10, 2024
21b50b5
Merge branch 'master' into powerlaw-dist
Qazalbash Sep 10, 2024
f1da2d5
chore: explicit enabling/disabling of 64bit floating point numbers
Qazalbash Sep 11, 2024
42ed59d
chore: disable everytime and enable x64 for power laws
Qazalbash Sep 11, 2024
2671edb
chore: disable x64 for every test
Qazalbash Sep 11, 2024
6d126ae
chore: linked explanation in comments for disabling x64 for future re…
Qazalbash Sep 11, 2024
34d9f82
chore: high precision test handeled efficiently for DoublyTruncatedPo…
Qazalbash Sep 17, 2024
41f6aa3
chore: high precision exception handled in test_log_prob_gradient
Qazalbash Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/source/distributions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,22 @@ ZeroSumNormal
:show-inheritance:
:member-order: bysource

DoublyTruncatedPowerLaw
^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: numpyro.distributions.continuous.DoublyTruncatedPowerLaw
:members:
:undoc-members:
:show-inheritance:
:member-order: bysource

LowerTruncatedPowerLaw
^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: numpyro.distributions.continuous.LowerTruncatedPowerLaw
:members:
:undoc-members:
:show-inheritance:
:member-order: bysource
Qazalbash marked this conversation as resolved.
Show resolved Hide resolved

Discrete Distributions
----------------------

Expand Down
4 changes: 4 additions & 0 deletions numpyro/distributions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Cauchy,
Chi2,
Dirichlet,
DoublyTruncatedPowerLaw,
EulerMaruyama,
Exponential,
Gamma,
Expand All @@ -35,6 +36,7 @@
Logistic,
LogNormal,
LogUniform,
LowerTruncatedPowerLaw,
LowRankMultivariateNormal,
MatrixNormal,
MultivariateNormal,
Expand Down Expand Up @@ -129,6 +131,7 @@
"Chi2",
"Delta",
"Dirichlet",
"DoublyTruncatedPowerLaw",
"DirichletMultinomial",
"DiscreteUniform",
"Distribution",
Expand Down Expand Up @@ -159,6 +162,7 @@
"Logistic",
"LogNormal",
"LogUniform",
"LowerTruncatedPowerLaw",
"MatrixNormal",
"MaskedDistribution",
"Mixture",
Expand Down
Loading
Loading