pymc-extras 0.2.4__tar.gz → 0.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. pymc_extras-0.2.6/.gitignore +48 -0
  2. pymc_extras-0.2.6/.gitpod.yml +37 -0
  3. pymc_extras-0.2.6/.pre-commit-config.yaml +29 -0
  4. pymc_extras-0.2.6/.readthedocs.yaml +30 -0
  5. pymc_extras-0.2.6/PKG-INFO +318 -0
  6. pymc_extras-0.2.6/_version.py +21 -0
  7. pymc_extras-0.2.6/codecov.yml +33 -0
  8. pymc_extras-0.2.6/conda-envs/environment-test.yml +19 -0
  9. pymc_extras-0.2.6/docs/Makefile +31 -0
  10. pymc_extras-0.2.6/docs/_templates/autosummary/base.rst +5 -0
  11. pymc_extras-0.2.6/docs/_templates/autosummary/class.rst +29 -0
  12. pymc_extras-0.2.6/docs/api_reference.rst +99 -0
  13. pymc_extras-0.2.6/docs/conf.py +216 -0
  14. pymc_extras-0.2.6/docs/index.rst +47 -0
  15. pymc_extras-0.2.6/docs/make.bat +35 -0
  16. pymc_extras-0.2.6/docs/statespace/core.rst +10 -0
  17. pymc_extras-0.2.6/docs/statespace/filters.rst +13 -0
  18. pymc_extras-0.2.6/docs/statespace/models/structural.rst +14 -0
  19. pymc_extras-0.2.6/docs/statespace/models.rst +20 -0
  20. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/__init__.py +6 -4
  21. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/distributions/__init__.py +2 -0
  22. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/distributions/continuous.py +3 -2
  23. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/distributions/discrete.py +3 -1
  24. pymc_extras-0.2.6/pymc_extras/distributions/transforms/__init__.py +3 -0
  25. pymc_extras-0.2.6/pymc_extras/distributions/transforms/partial_order.py +227 -0
  26. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/__init__.py +4 -2
  27. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/find_map.py +62 -17
  28. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/fit.py +6 -4
  29. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/laplace.py +14 -8
  30. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/pathfinder/lbfgs.py +49 -13
  31. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/pathfinder/pathfinder.py +89 -103
  32. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/core/statespace.py +191 -52
  33. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/filters/distributions.py +15 -16
  34. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/filters/kalman_filter.py +1 -18
  35. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/filters/kalman_smoother.py +2 -6
  36. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/models/ETS.py +10 -0
  37. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/models/SARIMAX.py +26 -5
  38. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/models/VARMAX.py +12 -2
  39. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/models/structural.py +18 -5
  40. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/utils/data_tools.py +24 -9
  41. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pyproject.toml +89 -0
  42. pymc_extras-0.2.6/tests/conftest.py +19 -0
  43. pymc_extras-0.2.6/tests/distributions/test_transform.py +77 -0
  44. pymc_extras-0.2.6/tests/model/transforms/test_autoreparam.py +131 -0
  45. pymc_extras-0.2.6/tests/statespace/_data/airpass.csv +145 -0
  46. pymc_extras-0.2.6/tests/statespace/_data/airpassangers.csv +145 -0
  47. pymc_extras-0.2.6/tests/statespace/_data/nile.csv +101 -0
  48. pymc_extras-0.2.6/tests/statespace/_data/statsmodels_macrodata_processed.csv +203 -0
  49. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/core}/test_representation.py +2 -2
  50. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/core}/test_statespace.py +80 -24
  51. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/core}/test_statespace_JAX.py +5 -9
  52. pymc_extras-0.2.6/tests/statespace/filters/__init__.py +0 -0
  53. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/filters}/test_distributions.py +2 -2
  54. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/filters}/test_kalman_filter.py +3 -3
  55. pymc_extras-0.2.6/tests/statespace/models/__init__.py +0 -0
  56. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/models}/test_ETS.py +9 -3
  57. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/models}/test_SARIMAX.py +14 -2
  58. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/models}/test_VARMAX.py +8 -2
  59. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/models}/test_structural.py +9 -5
  60. pymc_extras-0.2.4/tests/statespace/utilities/test_helpers.py → pymc_extras-0.2.6/tests/statespace/test_utilities.py +11 -4
  61. pymc_extras-0.2.6/tests/statespace/utils/__init__.py +0 -0
  62. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/statespace/utils}/test_coord_assignment.py +65 -1
  63. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_find_map.py +55 -0
  64. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_laplace.py +16 -0
  65. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_pathfinder.py +101 -7
  66. pymc_extras-0.2.6/tests/utils.py +0 -0
  67. pymc_extras-0.2.4/MANIFEST.in +0 -5
  68. pymc_extras-0.2.4/PKG-INFO +0 -110
  69. pymc_extras-0.2.4/pymc_extras/version.py +0 -11
  70. pymc_extras-0.2.4/pymc_extras/version.txt +0 -1
  71. pymc_extras-0.2.4/pymc_extras.egg-info/PKG-INFO +0 -110
  72. pymc_extras-0.2.4/pymc_extras.egg-info/SOURCES.txt +0 -115
  73. pymc_extras-0.2.4/pymc_extras.egg-info/dependency_links.txt +0 -1
  74. pymc_extras-0.2.4/pymc_extras.egg-info/requires.txt +0 -19
  75. pymc_extras-0.2.4/pymc_extras.egg-info/top_level.txt +0 -2
  76. pymc_extras-0.2.4/requirements-dev.txt +0 -5
  77. pymc_extras-0.2.4/requirements-docs.txt +0 -4
  78. pymc_extras-0.2.4/requirements.txt +0 -3
  79. pymc_extras-0.2.4/setup.cfg +0 -4
  80. pymc_extras-0.2.4/setup.py +0 -96
  81. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/CODE_OF_CONDUCT.md +0 -0
  82. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/CONTRIBUTING.md +0 -0
  83. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/LICENSE +0 -0
  84. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/README.md +0 -0
  85. /pymc_extras-0.2.4/pymc_extras/model/__init__.py → /pymc_extras-0.2.6/docs/.nojekyll +0 -0
  86. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/distributions/histogram_utils.py +0 -0
  87. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/distributions/multivariate/__init__.py +0 -0
  88. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/distributions/multivariate/r2d2m2cp.py +0 -0
  89. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/distributions/timeseries.py +0 -0
  90. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/gp/__init__.py +0 -0
  91. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/gp/latent_approx.py +0 -0
  92. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/pathfinder/__init__.py +0 -0
  93. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/pathfinder/importance_sampling.py +0 -0
  94. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/smc/__init__.py +0 -0
  95. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/inference/smc/sampling.py +0 -0
  96. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/linearmodel.py +0 -0
  97. {pymc_extras-0.2.4/pymc_extras/model/marginal → pymc_extras-0.2.6/pymc_extras/model}/__init__.py +0 -0
  98. {pymc_extras-0.2.4/pymc_extras/model/transforms → pymc_extras-0.2.6/pymc_extras/model/marginal}/__init__.py +0 -0
  99. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/model/marginal/distributions.py +0 -0
  100. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/model/marginal/graph_analysis.py +0 -0
  101. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/model/marginal/marginal_model.py +0 -0
  102. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/model/model_api.py +0 -0
  103. {pymc_extras-0.2.4/pymc_extras/preprocessing → pymc_extras-0.2.6/pymc_extras/model/transforms}/__init__.py +0 -0
  104. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/model/transforms/autoreparam.py +0 -0
  105. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/model_builder.py +0 -0
  106. {pymc_extras-0.2.4/pymc_extras/statespace/utils → pymc_extras-0.2.6/pymc_extras/preprocessing}/__init__.py +0 -0
  107. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/preprocessing/standard_scaler.py +0 -0
  108. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/printing.py +0 -0
  109. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/__init__.py +0 -0
  110. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/core/__init__.py +0 -0
  111. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/core/compile.py +0 -0
  112. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/core/representation.py +0 -0
  113. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/filters/__init__.py +0 -0
  114. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/filters/utilities.py +0 -0
  115. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/models/__init__.py +0 -0
  116. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/models/utilities.py +0 -0
  117. {pymc_extras-0.2.4/tests/model → pymc_extras-0.2.6/pymc_extras/statespace/utils}/__init__.py +0 -0
  118. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/utils/constants.py +0 -0
  119. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/statespace/utils/coord_tools.py +0 -0
  120. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/utils/__init__.py +0 -0
  121. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/utils/linear_cg.py +0 -0
  122. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/utils/model_equivalence.py +0 -0
  123. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/utils/pivoted_cholesky.py +0 -0
  124. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/utils/prior.py +0 -0
  125. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/pymc_extras/utils/spline.py +0 -0
  126. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/__init__.py +0 -0
  127. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/distributions/__init__.py +0 -0
  128. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/distributions/test_continuous.py +0 -0
  129. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/distributions/test_discrete.py +0 -0
  130. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/distributions/test_discrete_markov_chain.py +0 -0
  131. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/distributions/test_multivariate.py +0 -0
  132. {pymc_extras-0.2.4/tests/model/marginal → pymc_extras-0.2.6/tests/model}/__init__.py +0 -0
  133. {pymc_extras-0.2.4/tests/statespace → pymc_extras-0.2.6/tests/model/marginal}/__init__.py +0 -0
  134. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/model/marginal/test_distributions.py +0 -0
  135. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/model/marginal/test_graph_analysis.py +0 -0
  136. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/model/marginal/test_marginal_model.py +0 -0
  137. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/model/test_model_api.py +0 -0
  138. {pymc_extras-0.2.4/tests/statespace/utilities → pymc_extras-0.2.6/tests/statespace}/__init__.py +0 -0
  139. /pymc_extras-0.2.4/tests/utils.py → /pymc_extras-0.2.6/tests/statespace/core/__init__.py +0 -0
  140. {pymc_extras-0.2.4/tests/statespace/utilities → pymc_extras-0.2.6/tests/statespace}/shared_fixtures.py +0 -0
  141. {pymc_extras-0.2.4/tests/statespace/utilities → pymc_extras-0.2.6/tests/statespace}/statsmodel_local_level.py +0 -0
  142. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_blackjax_smc.py +0 -0
  143. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_histogram_approximation.py +0 -0
  144. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_linearmodel.py +0 -0
  145. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_model_builder.py +0 -0
  146. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_pivoted_cholesky.py +0 -0
  147. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_printing.py +0 -0
  148. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_prior_from_trace.py +0 -0
  149. {pymc_extras-0.2.4 → pymc_extras-0.2.6}/tests/test_splines.py +0 -0
@@ -0,0 +1,48 @@
1
+ *.pyc
2
+ *.sw[op]
3
+ examples/*.png
4
+ nb_examples/
5
+ nb_tutorials/
6
+ build/*
7
+ dist/*
8
+ *.egg-info/
9
+ .ipynb_checkpoints
10
+ tmtags
11
+ tags
12
+ .DS_Store
13
+ .cache
14
+ _version.py
15
+ # IntelliJ IDE
16
+ .idea
17
+ *.iml
18
+
19
+ # Sphinx
20
+ _build
21
+ docs/jupyter_execute
22
+ docs/.jupyter_cache
23
+ docs/**/generated/*
24
+
25
+ # Merge tool
26
+ *.orig
27
+
28
+ # Docker development
29
+ # notebooks/
30
+
31
+ # air speed velocity (asv)
32
+ benchmarks/env/
33
+ benchmarks/html/
34
+ benchmarks/results/
35
+ .pytest_cache/
36
+
37
+ # Visual Studio / VSCode
38
+ .vs/
39
+ .vscode/
40
+ .mypy_cache
41
+
42
+ pytestdebug.log
43
+ .dir-locals.el
44
+ .pycheckers
45
+
46
+ # Codespaces
47
+ pythonenv*
48
+ env/
@@ -0,0 +1,37 @@
1
+ image: ghcr.io/conda/conda-ci:main-linux-python3.9
2
+ tasks:
3
+ - name: initialize
4
+ init: |
5
+ mkdir -p .vscode
6
+ echo '{"python.defaultInterpreterPath": "/workspace/pymc-extras/env/bin/python"}' > .vscode/settings.json
7
+ conda init bash && source ~/.bashrc
8
+ conda env update -f conda-envs/environment-test.yml -p env
9
+ conda activate /workspace/pymc-extras/env
10
+ pip install -r requirements-dev.txt
11
+ pip install -e ."[dev]"
12
+ command: |
13
+ conda init bash && echo "conda activate /workspace/pymc-extras/env" >> ~/.bashrc && source ~/.bashrc
14
+
15
+ vscode:
16
+ extensions:
17
+ - eamodio.gitlens
18
+ - ms-python.python
19
+
20
+ github:
21
+ prebuilds:
22
+ # enable for master branch
23
+ master: true
24
+ # enable for other branches (defaults to false)
25
+ branches: true
26
+ # enable for pull requests coming from this repo (defaults to true)
27
+ pullRequests: true
28
+ # enable for pull requests coming from forks (defaults to false)
29
+ pullRequestsFromForks: false
30
+ # add a check to pull requests (defaults to true)
31
+ addCheck: true
32
+ # add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
33
+ addComment: false
34
+ # add a "Review in Gitpod" button to the pull request's description (defaults to false)
35
+ addBadge: false
36
+ # add a label once the prebuild is ready to pull requests (defaults to false)
37
+ addLabel: false
@@ -0,0 +1,29 @@
1
+ ci:
2
+ autofix_prs: false
3
+
4
+ repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v4.6.0
7
+ hooks:
8
+ - id: check-merge-conflict
9
+ - id: check-toml
10
+ - id: check-yaml
11
+ - id: debug-statements
12
+ - id: end-of-file-fixer
13
+ - id: no-commit-to-branch
14
+ args: [--branch, main]
15
+ - id: trailing-whitespace
16
+
17
+ - repo: https://github.com/astral-sh/ruff-pre-commit
18
+ rev: v0.5.5
19
+ hooks:
20
+ - id: ruff
21
+ args: [ --fix, --unsafe-fixes, --exit-non-zero-on-fix ]
22
+ - id: ruff-format
23
+ types_or: [ python, pyi, jupyter ]
24
+
25
+ - repo: https://github.com/MarcoGorelli/madforhooks
26
+ rev: 0.4.1
27
+ hooks:
28
+ - id: no-print-statements
29
+ files: ^pymc_extras/
@@ -0,0 +1,30 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+ version: 2
4
+
5
+ build:
6
+ os: ubuntu-20.04
7
+ tools:
8
+ python: "3.10"
9
+
10
+ python:
11
+ install:
12
+ - method: pip
13
+ path: .
14
+ extra_requirements:
15
+ - docs
16
+
17
+ sphinx:
18
+ fail_on_warning: false
19
+ configuration: docs/conf.py
20
+
21
+ search:
22
+ ranking:
23
+ _sources/*: -10
24
+ _modules/*: -5
25
+ genindex.html: -9
26
+
27
+ ignore:
28
+ - 404.html
29
+ - search.html
30
+ - index.html
@@ -0,0 +1,318 @@
1
+ Metadata-Version: 2.4
2
+ Name: pymc-extras
3
+ Version: 0.2.6
4
+ Summary: A home for new additions to PyMC, which may include unusual probability distribitions, advanced model fitting algorithms, or any code that may be inappropriate to include in the pymc repository, but may want to be made available to users.
5
+ Project-URL: Documentation, https://pymc-extras.readthedocs.io/
6
+ Project-URL: Repository, https://github.com/pymc-devs/pymc-extras.git
7
+ Project-URL: Issues, https://github.com/pymc-devs/pymc-extras/issues
8
+ Author-email: PyMC Developers <pymc.devs@gmail.com>
9
+ License: =======
10
+ License
11
+ =======
12
+
13
+ PyMC is distributed under the Apache License, Version 2.0
14
+
15
+ Copyright (c) 2006 Christopher J. Fonnesbeck (Academic Free License)
16
+ Copyright (c) 2007-2008 Christopher J. Fonnesbeck, Anand Prabhakar Patil, David Huard (Academic Free License)
17
+ Copyright (c) 2009-2017 The PyMC developers (see contributors to pymc-devs on GitHub)
18
+ All rights reserved.
19
+
20
+ Apache License
21
+ Version 2.0, January 2004
22
+ http://www.apache.org/licenses/
23
+
24
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
25
+
26
+ 1. Definitions.
27
+
28
+ "License" shall mean the terms and conditions for use, reproduction,
29
+ and distribution as defined by Sections 1 through 9 of this document.
30
+
31
+ "Licensor" shall mean the copyright owner or entity authorized by
32
+ the copyright owner that is granting the License.
33
+
34
+ "Legal Entity" shall mean the union of the acting entity and all
35
+ other entities that control, are controlled by, or are under common
36
+ control with that entity. For the purposes of this definition,
37
+ "control" means (i) the power, direct or indirect, to cause the
38
+ direction or management of such entity, whether by contract or
39
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
40
+ outstanding shares, or (iii) beneficial ownership of such entity.
41
+
42
+ "You" (or "Your") shall mean an individual or Legal Entity
43
+ exercising permissions granted by this License.
44
+
45
+ "Source" form shall mean the preferred form for making modifications,
46
+ including but not limited to software source code, documentation
47
+ source, and configuration files.
48
+
49
+ "Object" form shall mean any form resulting from mechanical
50
+ transformation or translation of a Source form, including but
51
+ not limited to compiled object code, generated documentation,
52
+ and conversions to other media types.
53
+
54
+ "Work" shall mean the work of authorship, whether in Source or
55
+ Object form, made available under the License, as indicated by a
56
+ copyright notice that is included in or attached to the work
57
+ (an example is provided in the Appendix below).
58
+
59
+ "Derivative Works" shall mean any work, whether in Source or Object
60
+ form, that is based on (or derived from) the Work and for which the
61
+ editorial revisions, annotations, elaborations, or other modifications
62
+ represent, as a whole, an original work of authorship. For the purposes
63
+ of this License, Derivative Works shall not include works that remain
64
+ separable from, or merely link (or bind by name) to the interfaces of,
65
+ the Work and Derivative Works thereof.
66
+
67
+ "Contribution" shall mean any work of authorship, including
68
+ the original version of the Work and any modifications or additions
69
+ to that Work or Derivative Works thereof, that is intentionally
70
+ submitted to Licensor for inclusion in the Work by the copyright owner
71
+ or by an individual or Legal Entity authorized to submit on behalf of
72
+ the copyright owner. For the purposes of this definition, "submitted"
73
+ means any form of electronic, verbal, or written communication sent
74
+ to the Licensor or its representatives, including but not limited to
75
+ communication on electronic mailing lists, source code control systems,
76
+ and issue tracking systems that are managed by, or on behalf of, the
77
+ Licensor for the purpose of discussing and improving the Work, but
78
+ excluding communication that is conspicuously marked or otherwise
79
+ designated in writing by the copyright owner as "Not a Contribution."
80
+
81
+ "Contributor" shall mean Licensor and any individual or Legal Entity
82
+ on behalf of whom a Contribution has been received by Licensor and
83
+ subsequently incorporated within the Work.
84
+
85
+ 2. Grant of Copyright License. Subject to the terms and conditions of
86
+ this License, each Contributor hereby grants to You a perpetual,
87
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
88
+ copyright license to reproduce, prepare Derivative Works of,
89
+ publicly display, publicly perform, sublicense, and distribute the
90
+ Work and such Derivative Works in Source or Object form.
91
+
92
+ 3. Grant of Patent License. Subject to the terms and conditions of
93
+ this License, each Contributor hereby grants to You a perpetual,
94
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
95
+ (except as stated in this section) patent license to make, have made,
96
+ use, offer to sell, sell, import, and otherwise transfer the Work,
97
+ where such license applies only to those patent claims licensable
98
+ by such Contributor that are necessarily infringed by their
99
+ Contribution(s) alone or by combination of their Contribution(s)
100
+ with the Work to which such Contribution(s) was submitted. If You
101
+ institute patent litigation against any entity (including a
102
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
103
+ or a Contribution incorporated within the Work constitutes direct
104
+ or contributory patent infringement, then any patent licenses
105
+ granted to You under this License for that Work shall terminate
106
+ as of the date such litigation is filed.
107
+
108
+ 4. Redistribution. You may reproduce and distribute copies of the
109
+ Work or Derivative Works thereof in any medium, with or without
110
+ modifications, and in Source or Object form, provided that You
111
+ meet the following conditions:
112
+
113
+ (a) You must give any other recipients of the Work or
114
+ Derivative Works a copy of this License; and
115
+
116
+ (b) You must cause any modified files to carry prominent notices
117
+ stating that You changed the files; and
118
+
119
+ (c) You must retain, in the Source form of any Derivative Works
120
+ that You distribute, all copyright, patent, trademark, and
121
+ attribution notices from the Source form of the Work,
122
+ excluding those notices that do not pertain to any part of
123
+ the Derivative Works; and
124
+
125
+ (d) If the Work includes a "NOTICE" text file as part of its
126
+ distribution, then any Derivative Works that You distribute must
127
+ include a readable copy of the attribution notices contained
128
+ within such NOTICE file, excluding those notices that do not
129
+ pertain to any part of the Derivative Works, in at least one
130
+ of the following places: within a NOTICE text file distributed
131
+ as part of the Derivative Works; within the Source form or
132
+ documentation, if provided along with the Derivative Works; or,
133
+ within a display generated by the Derivative Works, if and
134
+ wherever such third-party notices normally appear. The contents
135
+ of the NOTICE file are for informational purposes only and
136
+ do not modify the License. You may add Your own attribution
137
+ notices within Derivative Works that You distribute, alongside
138
+ or as an addendum to the NOTICE text from the Work, provided
139
+ that such additional attribution notices cannot be construed
140
+ as modifying the License.
141
+
142
+ You may add Your own copyright statement to Your modifications and
143
+ may provide additional or different license terms and conditions
144
+ for use, reproduction, or distribution of Your modifications, or
145
+ for any such Derivative Works as a whole, provided Your use,
146
+ reproduction, and distribution of the Work otherwise complies with
147
+ the conditions stated in this License.
148
+
149
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
150
+ any Contribution intentionally submitted for inclusion in the Work
151
+ by You to the Licensor shall be under the terms and conditions of
152
+ this License, without any additional terms or conditions.
153
+ Notwithstanding the above, nothing herein shall supersede or modify
154
+ the terms of any separate license agreement you may have executed
155
+ with Licensor regarding such Contributions.
156
+
157
+ 6. Trademarks. This License does not grant permission to use the trade
158
+ names, trademarks, service marks, or product names of the Licensor,
159
+ except as required for reasonable and customary use in describing the
160
+ origin of the Work and reproducing the content of the NOTICE file.
161
+
162
+ 7. Disclaimer of Warranty. Unless required by applicable law or
163
+ agreed to in writing, Licensor provides the Work (and each
164
+ Contributor provides its Contributions) on an "AS IS" BASIS,
165
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
166
+ implied, including, without limitation, any warranties or conditions
167
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
168
+ PARTICULAR PURPOSE. You are solely responsible for determining the
169
+ appropriateness of using or redistributing the Work and assume any
170
+ risks associated with Your exercise of permissions under this License.
171
+
172
+ 8. Limitation of Liability. In no event and under no legal theory,
173
+ whether in tort (including negligence), contract, or otherwise,
174
+ unless required by applicable law (such as deliberate and grossly
175
+ negligent acts) or agreed to in writing, shall any Contributor be
176
+ liable to You for damages, including any direct, indirect, special,
177
+ incidental, or consequential damages of any character arising as a
178
+ result of this License or out of the use or inability to use the
179
+ Work (including but not limited to damages for loss of goodwill,
180
+ work stoppage, computer failure or malfunction, or any and all
181
+ other commercial damages or losses), even if such Contributor
182
+ has been advised of the possibility of such damages.
183
+
184
+ 9. Accepting Warranty or Additional Liability. While redistributing
185
+ the Work or Derivative Works thereof, You may choose to offer,
186
+ and charge a fee for, acceptance of support, warranty, indemnity,
187
+ or other liability obligations and/or rights consistent with this
188
+ License. However, in accepting such obligations, You may act only
189
+ on Your own behalf and on Your sole responsibility, not on behalf
190
+ of any other Contributor, and only if You agree to indemnify,
191
+ defend, and hold each Contributor harmless for any liability
192
+ incurred by, or claims asserted against, such Contributor by reason
193
+ of your accepting any such warranty or additional liability.
194
+
195
+ END OF TERMS AND CONDITIONS
196
+
197
+ APPENDIX: How to apply the Apache License to your work.
198
+
199
+ To apply the Apache License to your work, attach the following
200
+ boilerplate notice, with the fields enclosed by brackets "[]"
201
+ replaced with your own identifying information. (Don't include
202
+ the brackets!) The text should be enclosed in the appropriate
203
+ comment syntax for the file format. We also recommend that a
204
+ file or class name and description of purpose be included on the
205
+ same "printed page" as the copyright notice for easier
206
+ identification within third-party archives.
207
+
208
+ Copyright 2020 The PyMC Developers
209
+
210
+ Licensed under the Apache License, Version 2.0 (the "License");
211
+ you may not use this file except in compliance with the License.
212
+ You may obtain a copy of the License at
213
+
214
+ http://www.apache.org/licenses/LICENSE-2.0
215
+
216
+ Unless required by applicable law or agreed to in writing, software
217
+ distributed under the License is distributed on an "AS IS" BASIS,
218
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
219
+ See the License for the specific language governing permissions and
220
+ limitations under the License.
221
+ License-File: LICENSE
222
+ Keywords: bayesian,machine learning,mcmc,probability,sampling,statistics
223
+ Classifier: Development Status :: 5 - Production/Stable
224
+ Classifier: Intended Audience :: Science/Research
225
+ Classifier: License :: OSI Approved :: Apache Software License
226
+ Classifier: Operating System :: OS Independent
227
+ Classifier: Programming Language :: Python
228
+ Classifier: Programming Language :: Python :: 3
229
+ Classifier: Programming Language :: Python :: 3.10
230
+ Classifier: Programming Language :: Python :: 3.11
231
+ Classifier: Programming Language :: Python :: 3.12
232
+ Classifier: Programming Language :: Python :: 3.13
233
+ Classifier: Topic :: Scientific/Engineering
234
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
235
+ Requires-Python: >=3.10
236
+ Requires-Dist: better-optimize>=0.1.2
237
+ Requires-Dist: pymc>=5.21.1
238
+ Requires-Dist: scikit-learn
239
+ Provides-Extra: complete
240
+ Requires-Dist: dask[complete]<2025.1.1; extra == 'complete'
241
+ Requires-Dist: xhistogram; extra == 'complete'
242
+ Provides-Extra: dask-histogram
243
+ Requires-Dist: dask[complete]<2025.1.1; extra == 'dask-histogram'
244
+ Requires-Dist: xhistogram; extra == 'dask-histogram'
245
+ Provides-Extra: dev
246
+ Requires-Dist: blackjax; extra == 'dev'
247
+ Requires-Dist: dask[all]<2025.1.1; extra == 'dev'
248
+ Requires-Dist: pytest>=6.0; extra == 'dev'
249
+ Requires-Dist: statsmodels; extra == 'dev'
250
+ Provides-Extra: docs
251
+ Requires-Dist: nbsphinx>=0.4.2; extra == 'docs'
252
+ Requires-Dist: pymc-sphinx-theme>=0.16; extra == 'docs'
253
+ Requires-Dist: sphinx>=4.0; extra == 'docs'
254
+ Provides-Extra: histogram
255
+ Requires-Dist: xhistogram; extra == 'histogram'
256
+ Description-Content-Type: text/markdown
257
+
258
+ # Welcome to `pymc-extras`
259
+ <a href="https://gitpod.io/#https://github.com/pymc-devs/pymc-extras">
260
+ <img
261
+ src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
262
+ alt="Contribute with Gitpod"
263
+ />
264
+ </a>
265
+ <img
266
+ src="https://codecov.io/gh/pymc-devs/pymc-extras/branch/main/graph/badge.svg"
267
+ alt="Codecov Badge"
268
+ />
269
+
270
+ As PyMC continues to mature and expand its functionality to accommodate more domains of application, we increasingly see cutting-edge methodologies, highly specialized statistical distributions, and complex models appear.
271
+ While this adds to the functionality and relevance of the project, it can also introduce instability and impose a burden on testing and quality control.
272
+ To reduce the burden on the main `pymc` repository, this `pymc-extras` repository can become the aggregator and testing ground for new additions to PyMC.
273
+ This may include unusual probability distributions, advanced model fitting algorithms, innovative yet not fully tested methods, or niche functionality that might not fit in the main PyMC repository, but still may be of interest to users.
274
+
275
+ The `pymc-extras` repository can be understood as the first step in the PyMC development pipeline, where all novel code is introduced until it is obvious that it belongs in the main repository.
276
+ We hope that this organization improves the stability and streamlines the testing overhead of the `pymc` repository, while allowing users and developers to test and evaluate cutting-edge methods and not yet fully mature features.
277
+
278
+ `pymc-extras` would be designed to mirror the namespaces in `pymc` to make usage and migration as easy as possible.
279
+ For example, a `ParabolicFractal` distribution could be used analogously to those in `pymc`:
280
+
281
+ ```python
282
+ import pymc as pm
283
+ import pymc_extras as pmx
284
+
285
+ with pm.Model():
286
+ alpha = pmx.ParabolicFractal('alpha', b=1, c=1)
287
+
288
+ ...
289
+
290
+ ```
291
+
292
+ ## Questions
293
+
294
+ ### What belongs in `pymc-extras`?
295
+
296
+ - newly-implemented statistical methods, for example step methods or model construction helpers
297
+ - distributions that are tricky to sample from or test
298
+ - infrequently-used fitting methods or distributions
299
+ - any code that requires additional optimization before it can be used in practice
300
+
301
+
302
+ ### What does not belong in `pymc-extras`?
303
+ - Case studies
304
+ - Implementations that cannot be applied generically, for example because they are tied to variables from a toy example
305
+
306
+
307
+ ### Should there be more than one add-on repository?
308
+
309
+ Since there is a lot of code that we may not want in the main repository, does it make sense to have more than one additional repository?
310
+ For example, `pymc-extras` may just include methods that are not fully developed, tested and trusted, while code that is known to work well and has adequate test coverage, but is still too specialized to become part of `pymc` could reside in a `pymc-extras` (or similar) repository.
311
+
312
+
313
+ ### Unanswered questions & ToDos
314
+ This project is still young and many things have not been answered or implemented.
315
+ Please get involved!
316
+
317
+ * What are guidelines for organizing submodules?
318
+ * Proposal: No default imports of WIP/unstable submodules. By importing manually we can avoid breaking the package if a submodule breaks, for example because of an updated dependency.
@@ -0,0 +1,21 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
6
+ TYPE_CHECKING = False
7
+ if TYPE_CHECKING:
8
+ from typing import Tuple
9
+ from typing import Union
10
+
11
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
12
+ else:
13
+ VERSION_TUPLE = object
14
+
15
+ version: str
16
+ __version__: str
17
+ __version_tuple__: VERSION_TUPLE
18
+ version_tuple: VERSION_TUPLE
19
+
20
+ __version__ = version = '0.2.6'
21
+ __version_tuple__ = version_tuple = (0, 2, 6)
@@ -0,0 +1,33 @@
1
+ codecov:
2
+ require_ci_to_pass: no
3
+ notify:
4
+ after_n_builds: 6
5
+
6
+ coverage:
7
+ precision: 2
8
+ round: down
9
+ range: "70...100"
10
+ status:
11
+ project:
12
+ default:
13
+ # basic
14
+ target: auto
15
+ threshold: 1%
16
+ base: auto
17
+ patch:
18
+ default:
19
+ # basic
20
+ target: 50%
21
+ threshold: 1%
22
+ base: auto
23
+
24
+ ignore:
25
+ - "tests/*"
26
+
27
+ comment:
28
+ layout: "reach, diff, flags, files"
29
+ behavior: default
30
+ require_changes: false # if true: only post the comment if coverage changes
31
+ require_base: no # [yes :: must have a base report to post]
32
+ require_head: yes # [yes :: must have a head report to post]
33
+ branches: null # branch names that can post comment
@@ -0,0 +1,19 @@
1
+ name: pymc-extras-test
2
+ channels:
3
+ - conda-forge
4
+ - nodefaults
5
+ dependencies:
6
+ - pymc>=5.21.1
7
+ - scikit-learn
8
+ - better-optimize>=0.1.2
9
+ - dask<2025.1.1
10
+ - xhistogram
11
+ - statsmodels
12
+ - numba
13
+ - pytest
14
+ - pytest-cov
15
+ - libgcc<15
16
+ - pip
17
+ - pip:
18
+ - jax
19
+ - blackjax
@@ -0,0 +1,31 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ SOURCEDIR =
8
+ BUILDDIR ?= _build
9
+
10
+ # Put it first so that "make" without argument is like "make help".
11
+ help:
12
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13
+
14
+ .PHONY: help Makefile
15
+
16
+ clean:
17
+ rm -rf $(BUILDDIR)/*
18
+
19
+ # For local build
20
+ local:
21
+ sphinx-build "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
22
+
23
+ # Catch-all target: route all unknown targets to Sphinx using the new
24
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
25
+ %: Makefile
26
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
27
+
28
+ doctest:
29
+ $(SPHINXBUILD) -b doctest $(SOURCEDIR) $(BUILDDIR)/doctest
30
+ @echo "Testing of doctests in the sources finished, look at the " \
31
+ "results in $(BUILDDIR)/doctest/output.txt"
@@ -0,0 +1,5 @@
1
+ {{ objname | escape | underline }}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. auto{{ objtype }}:: {{ objname }}
@@ -0,0 +1,29 @@
1
+ {{ objname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. autoclass:: {{ objname }}
6
+
7
+ {% block methods %}
8
+ .. automethod:: __init__
9
+
10
+ {% if methods %}
11
+ .. rubric:: {{ _('Methods') }}
12
+
13
+ .. autosummary::
14
+ {% for item in methods %}
15
+ ~{{ name }}.{{ item }}
16
+ {%- endfor %}
17
+ {% endif %}
18
+ {% endblock %}
19
+
20
+ {% block attributes %}
21
+ {% if attributes %}
22
+ .. rubric:: {{ _('Attributes') }}
23
+
24
+ .. autosummary::
25
+ {% for item in attributes %}
26
+ ~{{ name }}.{{ item }}
27
+ {%- endfor %}
28
+ {% endif %}
29
+ {% endblock %}