pymc-extras 0.2.5__py3-none-any.whl → 0.2.7__py3-none-any.whl

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 (65) hide show
  1. pymc_extras/__init__.py +5 -1
  2. pymc_extras/deserialize.py +224 -0
  3. pymc_extras/distributions/continuous.py +3 -2
  4. pymc_extras/distributions/discrete.py +3 -1
  5. pymc_extras/inference/find_map.py +62 -17
  6. pymc_extras/inference/laplace.py +10 -7
  7. pymc_extras/prior.py +1356 -0
  8. pymc_extras/statespace/core/statespace.py +191 -52
  9. pymc_extras/statespace/filters/distributions.py +15 -16
  10. pymc_extras/statespace/filters/kalman_filter.py +1 -18
  11. pymc_extras/statespace/filters/kalman_smoother.py +2 -6
  12. pymc_extras/statespace/models/ETS.py +10 -0
  13. pymc_extras/statespace/models/SARIMAX.py +26 -5
  14. pymc_extras/statespace/models/VARMAX.py +12 -2
  15. pymc_extras/statespace/models/structural.py +18 -5
  16. pymc_extras-0.2.7.dist-info/METADATA +321 -0
  17. pymc_extras-0.2.7.dist-info/RECORD +66 -0
  18. {pymc_extras-0.2.5.dist-info → pymc_extras-0.2.7.dist-info}/WHEEL +1 -2
  19. pymc_extras/utils/pivoted_cholesky.py +0 -69
  20. pymc_extras/version.py +0 -11
  21. pymc_extras/version.txt +0 -1
  22. pymc_extras-0.2.5.dist-info/METADATA +0 -112
  23. pymc_extras-0.2.5.dist-info/RECORD +0 -108
  24. pymc_extras-0.2.5.dist-info/top_level.txt +0 -2
  25. tests/__init__.py +0 -13
  26. tests/distributions/__init__.py +0 -19
  27. tests/distributions/test_continuous.py +0 -185
  28. tests/distributions/test_discrete.py +0 -210
  29. tests/distributions/test_discrete_markov_chain.py +0 -258
  30. tests/distributions/test_multivariate.py +0 -304
  31. tests/distributions/test_transform.py +0 -77
  32. tests/model/__init__.py +0 -0
  33. tests/model/marginal/__init__.py +0 -0
  34. tests/model/marginal/test_distributions.py +0 -132
  35. tests/model/marginal/test_graph_analysis.py +0 -182
  36. tests/model/marginal/test_marginal_model.py +0 -967
  37. tests/model/test_model_api.py +0 -38
  38. tests/statespace/__init__.py +0 -0
  39. tests/statespace/test_ETS.py +0 -411
  40. tests/statespace/test_SARIMAX.py +0 -405
  41. tests/statespace/test_VARMAX.py +0 -184
  42. tests/statespace/test_coord_assignment.py +0 -181
  43. tests/statespace/test_distributions.py +0 -270
  44. tests/statespace/test_kalman_filter.py +0 -326
  45. tests/statespace/test_representation.py +0 -175
  46. tests/statespace/test_statespace.py +0 -872
  47. tests/statespace/test_statespace_JAX.py +0 -156
  48. tests/statespace/test_structural.py +0 -836
  49. tests/statespace/utilities/__init__.py +0 -0
  50. tests/statespace/utilities/shared_fixtures.py +0 -9
  51. tests/statespace/utilities/statsmodel_local_level.py +0 -42
  52. tests/statespace/utilities/test_helpers.py +0 -310
  53. tests/test_blackjax_smc.py +0 -222
  54. tests/test_find_map.py +0 -103
  55. tests/test_histogram_approximation.py +0 -109
  56. tests/test_laplace.py +0 -281
  57. tests/test_linearmodel.py +0 -208
  58. tests/test_model_builder.py +0 -306
  59. tests/test_pathfinder.py +0 -297
  60. tests/test_pivoted_cholesky.py +0 -24
  61. tests/test_printing.py +0 -98
  62. tests/test_prior_from_trace.py +0 -172
  63. tests/test_splines.py +0 -77
  64. tests/utils.py +0 -0
  65. {pymc_extras-0.2.5.dist-info → pymc_extras-0.2.7.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,321 @@
1
+ Metadata-Version: 2.4
2
+ Name: pymc-extras
3
+ Version: 0.2.7
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: preliz
238
+ Requires-Dist: pydantic>=2.0.0
239
+ Requires-Dist: pymc>=5.21.1
240
+ Requires-Dist: scikit-learn
241
+ Provides-Extra: complete
242
+ Requires-Dist: dask[complete]<2025.1.1; extra == 'complete'
243
+ Requires-Dist: xhistogram; extra == 'complete'
244
+ Provides-Extra: dask-histogram
245
+ Requires-Dist: dask[complete]<2025.1.1; extra == 'dask-histogram'
246
+ Requires-Dist: xhistogram; extra == 'dask-histogram'
247
+ Provides-Extra: dev
248
+ Requires-Dist: blackjax; extra == 'dev'
249
+ Requires-Dist: dask[all]<2025.1.1; extra == 'dev'
250
+ Requires-Dist: pytest-mock; extra == 'dev'
251
+ Requires-Dist: pytest>=6.0; extra == 'dev'
252
+ Requires-Dist: statsmodels; extra == 'dev'
253
+ Provides-Extra: docs
254
+ Requires-Dist: nbsphinx>=0.4.2; extra == 'docs'
255
+ Requires-Dist: pymc-sphinx-theme>=0.16; extra == 'docs'
256
+ Requires-Dist: sphinx>=4.0; extra == 'docs'
257
+ Provides-Extra: histogram
258
+ Requires-Dist: xhistogram; extra == 'histogram'
259
+ Description-Content-Type: text/markdown
260
+
261
+ # Welcome to `pymc-extras`
262
+ <a href="https://gitpod.io/#https://github.com/pymc-devs/pymc-extras">
263
+ <img
264
+ src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
265
+ alt="Contribute with Gitpod"
266
+ />
267
+ </a>
268
+ <img
269
+ src="https://codecov.io/gh/pymc-devs/pymc-extras/branch/main/graph/badge.svg"
270
+ alt="Codecov Badge"
271
+ />
272
+
273
+ 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.
274
+ 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.
275
+ 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.
276
+ 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.
277
+
278
+ 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.
279
+ 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.
280
+
281
+ `pymc-extras` would be designed to mirror the namespaces in `pymc` to make usage and migration as easy as possible.
282
+ For example, a `ParabolicFractal` distribution could be used analogously to those in `pymc`:
283
+
284
+ ```python
285
+ import pymc as pm
286
+ import pymc_extras as pmx
287
+
288
+ with pm.Model():
289
+ alpha = pmx.ParabolicFractal('alpha', b=1, c=1)
290
+
291
+ ...
292
+
293
+ ```
294
+
295
+ ## Questions
296
+
297
+ ### What belongs in `pymc-extras`?
298
+
299
+ - newly-implemented statistical methods, for example step methods or model construction helpers
300
+ - distributions that are tricky to sample from or test
301
+ - infrequently-used fitting methods or distributions
302
+ - any code that requires additional optimization before it can be used in practice
303
+
304
+
305
+ ### What does not belong in `pymc-extras`?
306
+ - Case studies
307
+ - Implementations that cannot be applied generically, for example because they are tied to variables from a toy example
308
+
309
+
310
+ ### Should there be more than one add-on repository?
311
+
312
+ 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?
313
+ 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.
314
+
315
+
316
+ ### Unanswered questions & ToDos
317
+ This project is still young and many things have not been answered or implemented.
318
+ Please get involved!
319
+
320
+ * What are guidelines for organizing submodules?
321
+ * 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,66 @@
1
+ pymc_extras/__init__.py,sha256=YsR6OG72aW73y6dGS7w3nGGMV-V-ImHkmUOXKMPfMRA,1230
2
+ pymc_extras/deserialize.py,sha256=dktK5gsR96X3zAUoRF5udrTiconknH3uupiAWqkZi0M,5937
3
+ pymc_extras/linearmodel.py,sha256=6eitl15Ec15mSZu7zoHZ7Wwy4U1DPwqfAgwEt6ILeIc,3920
4
+ pymc_extras/model_builder.py,sha256=sAw77fxdiy046BvDPjocuMlbJ0Efj-CDAGtmcwYmoG0,26361
5
+ pymc_extras/printing.py,sha256=G8mj9dRd6i0PcsbcEWZm56ek6V8mmil78RI4MUhywBs,6506
6
+ pymc_extras/prior.py,sha256=dmw9Jz4DXRxT9jA-L3QSgMOODKqcim4NC5XguARSbxU,38718
7
+ pymc_extras/distributions/__init__.py,sha256=fDbrBt9mxEVp2CDPwnyCW3oiutzZ0PduB8EUH3fUrjI,1377
8
+ pymc_extras/distributions/continuous.py,sha256=530wvcO-QcYVdiVN-iQRveImWfyJzzmxiZLMVShP7w4,11251
9
+ pymc_extras/distributions/discrete.py,sha256=HNi-K0_hnNWTcfyBkWGh26sc71FwBgukQ_EjGAaAOjY,13036
10
+ pymc_extras/distributions/histogram_utils.py,sha256=5RTvlGCUrp2qzshrchmPyWxjhs6RIYL62SMikjDM1TU,5814
11
+ pymc_extras/distributions/timeseries.py,sha256=M5MZ-nik_tgkaoZ1hdUGEZ9g04DQyVLwszVJqSKwNcY,12719
12
+ pymc_extras/distributions/multivariate/__init__.py,sha256=E8OeLW9tTotCbrUjEo4um76-_WQD56PehsPzkKmhfyA,93
13
+ pymc_extras/distributions/multivariate/r2d2m2cp.py,sha256=bUj9bB-hQi6CpaJfvJjgNPi727uTbvAdxl9fm1zNBqY,16005
14
+ pymc_extras/distributions/transforms/__init__.py,sha256=FUp2vyRE6_2eUcQ_FVt5Dn0-vy5I-puV-Kz13-QtLNc,104
15
+ pymc_extras/distributions/transforms/partial_order.py,sha256=oEZlc9WgnGR46uFEjLzKEUxlhzIo2vrUUbBE3vYrsfQ,8404
16
+ pymc_extras/gp/__init__.py,sha256=sFHw2y3lEl5tG_FDQHZUonQ_k0DF1JRf0Rp8dpHmge0,745
17
+ pymc_extras/gp/latent_approx.py,sha256=cDEMM6H1BL2qyKg7BZU-ISrKn2HJe7hDaM4Y8GgQDf4,6682
18
+ pymc_extras/inference/__init__.py,sha256=UH6S0bGfQKKyTSuqf7yezdy9PeE2bDU8U1v4eIRv4ZI,887
19
+ pymc_extras/inference/find_map.py,sha256=g_qXZbMz6w-De9wCMbBx8yLNkQANdPVWxLN7nJ0O17I,18523
20
+ pymc_extras/inference/fit.py,sha256=oe20RAajImZ-VD9Ucbzri8Bof4Y2KHNhNRG19v9O3lI,1336
21
+ pymc_extras/inference/laplace.py,sha256=Rq_D6veUYmW93GEyU8UZXiQquvJw-lK1np7NPxKCFqU,22064
22
+ pymc_extras/inference/pathfinder/__init__.py,sha256=FhAYrCWNx_dCrynEdjg2CZ9tIinvcVLBm67pNx_Y3kA,101
23
+ pymc_extras/inference/pathfinder/importance_sampling.py,sha256=NwxepXOFit3cA5zEebniKdlnJ1rZWg56aMlH4MEOcG4,6264
24
+ pymc_extras/inference/pathfinder/lbfgs.py,sha256=GOoJBil5Kft_iFwGNUGKSeqzI5x_shA4KQWDwgGuQtQ,7110
25
+ pymc_extras/inference/pathfinder/pathfinder.py,sha256=GW04HQurj_3Nlo1C6_K2tEIeigo8x0buV3FqDLA88PQ,64439
26
+ pymc_extras/inference/smc/__init__.py,sha256=wyaT4NJl1YsSQRLiDy-i0Jq3CbJZ2BQd4nnCk-dIngY,603
27
+ pymc_extras/inference/smc/sampling.py,sha256=AYwmKqGoV6pBtKnh9SUbBKbN7VcoFgb3MmNWV7SivMA,15365
28
+ pymc_extras/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
+ pymc_extras/model/model_api.py,sha256=UHMfQXxWBujeSiUySU0fDUC5Sd_BjT8FoVz3iBxQH_4,2400
30
+ pymc_extras/model/marginal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
+ pymc_extras/model/marginal/distributions.py,sha256=iM1yT7_BmivgUSloQPKE2QXGPgjvLqDMY_OTBGsdAWg,15563
32
+ pymc_extras/model/marginal/graph_analysis.py,sha256=0hWUH_PjfpgneQ3NaT__pWHS1fh50zNbI86kH4Nub0E,15693
33
+ pymc_extras/model/marginal/marginal_model.py,sha256=oIdikaSnefCkyMxmzAe222qGXNucxZpHYk7548fK6iA,23631
34
+ pymc_extras/model/transforms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
+ pymc_extras/model/transforms/autoreparam.py,sha256=_NltGWmNqi_X9sHCqAvWcBveLTPxVy11-wENFTcN6kk,12377
36
+ pymc_extras/preprocessing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ pymc_extras/preprocessing/standard_scaler.py,sha256=Vajp33ma6OkwlU54JYtSS8urHbMJ3CRiRFxZpvFNuus,600
38
+ pymc_extras/statespace/__init__.py,sha256=0MtZj7yT6jcyERvITnn-nkhyY8fO6Za4_vV53CF6ND0,429
39
+ pymc_extras/statespace/core/__init__.py,sha256=huHEiXAm8zV2MZyZ8GBHp6q7_fnWqveM7lC6ilpb3iE,309
40
+ pymc_extras/statespace/core/compile.py,sha256=9FZfE8Bi3VfElxujfOIKRVvmyL9M5R0WfNEqPc5kbVQ,1603
41
+ pymc_extras/statespace/core/representation.py,sha256=DwNIun6wdeEA20oWBx5M4govyWTf5JI87aGQ_E6Mb4U,18956
42
+ pymc_extras/statespace/core/statespace.py,sha256=9jCQ4odmLK3S33tQzKMqck2gsgVoo-C3hOCBX5dc9lA,104674
43
+ pymc_extras/statespace/filters/__init__.py,sha256=N9Q4D0gAq_ZtT-GtrqiX1HkSg6Orv7o1TbrWUtnbTJE,420
44
+ pymc_extras/statespace/filters/distributions.py,sha256=-s1c5s2zm6FMc0UqKSrWnJzIF4U5bvJT_3mMNTyV_ak,11927
45
+ pymc_extras/statespace/filters/kalman_filter.py,sha256=Z6kxsbW8_VQ6ZcPjDMA5d_XPfdUY1-4GfRwKbBNfVZs,31438
46
+ pymc_extras/statespace/filters/kalman_smoother.py,sha256=SAjnqtiDdvV79Pp4jp6UzrdIMmH1lqXhCj5WLeHusr8,4167
47
+ pymc_extras/statespace/filters/utilities.py,sha256=iwdaYnO1cO06t_XUjLLRmqb8vwzzVH6Nx1iyZcbJL2k,1584
48
+ pymc_extras/statespace/models/ETS.py,sha256=08sbiuNvKdxcgKzS7jWj-z4jf-su73WFkYc8sKkGdEs,28538
49
+ pymc_extras/statespace/models/SARIMAX.py,sha256=aXR6KYuqtSBOk-jvm9NvnOX5vu4QesBgCIL-KR89SXs,22207
50
+ pymc_extras/statespace/models/VARMAX.py,sha256=CX8Gs4GP3u6aD2b8nxonA5zCoQzIca668iLF0SkKF00,16456
51
+ pymc_extras/statespace/models/__init__.py,sha256=U79b8rTHBNijVvvGOd43nLu4PCloPUH1rwlN87-n88c,317
52
+ pymc_extras/statespace/models/structural.py,sha256=ZK2tAlY0VP2BqueKSvEDTrVJNj3Q8muVsW2YO46mtww,64455
53
+ pymc_extras/statespace/models/utilities.py,sha256=G9GuHKsghmIYOlfkPtvxBWF-FZY5-5JI1fJQM8N7EnE,15373
54
+ pymc_extras/statespace/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ pymc_extras/statespace/utils/constants.py,sha256=Kf6j75ABaDQeRODxKQ76wTUQV4F5sTjn1KBcZgCQx20,2403
56
+ pymc_extras/statespace/utils/coord_tools.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
+ pymc_extras/statespace/utils/data_tools.py,sha256=01sz6XDtLYK9I5xghxYpD-PuDzGXv9D-wFGfTV6FGEw,6566
58
+ pymc_extras/utils/__init__.py,sha256=yxI9cJ7fCtVQS0GFw0y6mDGZIQZiK53vm3UNKqIuGSk,758
59
+ pymc_extras/utils/linear_cg.py,sha256=KkXhuimFsrKtNd_0By2ApxQQQNm5FdBtmDQJOVbLYkA,10056
60
+ pymc_extras/utils/model_equivalence.py,sha256=8QIftID2HDxD659i0RXHazQ-l2Q5YegCRLcDqb2p9Pc,2187
61
+ pymc_extras/utils/prior.py,sha256=QlWVr7uKIK9VncBw7Fz3YgaASKGDfqpORZHc-vz_9gQ,6841
62
+ pymc_extras/utils/spline.py,sha256=qGq0gcoMG5dpdazKFzG0RXkkCWP8ADPPXN-653-oFn4,4820
63
+ pymc_extras-0.2.7.dist-info/METADATA,sha256=hJCZrC9jdx_GkpFhHSzWgdUGxx6TZGw6jwYXeNIJ8-c,18909
64
+ pymc_extras-0.2.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
65
+ pymc_extras-0.2.7.dist-info/licenses/LICENSE,sha256=WjiLhUKEysJvy5e9jk6WwFv9tmAPtnov1uJ6gcH1kIs,11720
66
+ pymc_extras-0.2.7.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.1)
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -1,69 +0,0 @@
1
- try:
2
- import torch
3
-
4
- from gpytorch.utils.permutation import apply_permutation
5
- except ImportError as e:
6
- raise ImportError("PyTorch and GPyTorch not found.") from e
7
-
8
- import numpy as np
9
-
10
-
11
- def pp(x):
12
- return np.array2string(x, precision=4, floatmode="fixed")
13
-
14
-
15
- def pivoted_cholesky(mat: np.matrix, error_tol=1e-6, max_iter=np.inf):
16
- """
17
- mat: numpy matrix of N x N
18
-
19
- This is to replicate what is done in GPyTorch verbatim.
20
- """
21
- n = mat.shape[-1]
22
- max_iter = min(int(max_iter), n)
23
-
24
- d = np.array(np.diag(mat))
25
- orig_error = np.max(d)
26
- error = np.linalg.norm(d, 1) / orig_error
27
- pi = np.arange(n)
28
-
29
- L = np.zeros((max_iter, n))
30
-
31
- m = 0
32
- while m < max_iter and error > error_tol:
33
- permuted_d = d[pi]
34
- max_diag_idx = np.argmax(permuted_d[m:])
35
- max_diag_idx = max_diag_idx + m
36
- max_diag_val = permuted_d[max_diag_idx]
37
- i = max_diag_idx
38
-
39
- # swap pi_m and pi_i
40
- pi[m], pi[i] = pi[i], pi[m]
41
- pim = pi[m]
42
-
43
- L[m, pim] = np.sqrt(max_diag_val)
44
-
45
- if m + 1 < n:
46
- row = apply_permutation(
47
- torch.from_numpy(mat), torch.tensor(pim), right_permutation=None
48
- ) # left permutation just swaps row
49
- row = row.numpy().flatten()
50
- pi_i = pi[m + 1 :]
51
- L_m_new = row[pi_i] # length = 9
52
-
53
- if m > 0:
54
- L_prev = L[:m, pi_i]
55
- update = L[:m, pim]
56
- prod = update @ L_prev
57
- L_m_new = L_m_new - prod # np.sum(prod, axis=-1)
58
-
59
- L_m = L[m, :]
60
- L_m_new = L_m_new / L_m[pim]
61
- L_m[pi_i] = L_m_new
62
-
63
- matrix_diag_current = d[pi_i]
64
- d[pi_i] = matrix_diag_current - L_m_new**2
65
-
66
- L[m, :] = L_m
67
- error = np.linalg.norm(d[pi_i], 1) / orig_error
68
- m = m + 1
69
- return L, pi
pymc_extras/version.py DELETED
@@ -1,11 +0,0 @@
1
- import os
2
-
3
-
4
- def get_version():
5
- version_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), "version.txt")
6
- with open(version_file) as f:
7
- version = f.read().strip()
8
- return version
9
-
10
-
11
- __version__ = get_version()
pymc_extras/version.txt DELETED
@@ -1 +0,0 @@
1
- 0.2.5
@@ -1,112 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pymc-extras
3
- Version: 0.2.5
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
- Home-page: http://github.com/pymc-devs/pymc-extras
6
- Maintainer: PyMC Developers
7
- Maintainer-email: pymc.devs@gmail.com
8
- License: Apache-2.0
9
- Classifier: Development Status :: 5 - Production/Stable
10
- Classifier: Programming Language :: Python
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Classifier: License :: OSI Approved :: Apache Software License
17
- Classifier: Intended Audience :: Science/Research
18
- Classifier: Topic :: Scientific/Engineering
19
- Classifier: Topic :: Scientific/Engineering :: Mathematics
20
- Classifier: Operating System :: OS Independent
21
- Requires-Python: >=3.10
22
- Description-Content-Type: text/markdown
23
- License-File: LICENSE
24
- Requires-Dist: pymc>=5.21.1
25
- Requires-Dist: scikit-learn
26
- Requires-Dist: better-optimize
27
- Provides-Extra: dask-histogram
28
- Requires-Dist: dask[complete]; extra == "dask-histogram"
29
- Requires-Dist: xhistogram; extra == "dask-histogram"
30
- Provides-Extra: histogram
31
- Requires-Dist: xhistogram; extra == "histogram"
32
- Provides-Extra: complete
33
- Requires-Dist: dask[complete]; extra == "complete"
34
- Requires-Dist: xhistogram; extra == "complete"
35
- Provides-Extra: dev
36
- Requires-Dist: dask[all]; extra == "dev"
37
- Requires-Dist: blackjax; extra == "dev"
38
- Requires-Dist: statsmodels; extra == "dev"
39
- Dynamic: classifier
40
- Dynamic: description
41
- Dynamic: description-content-type
42
- Dynamic: home-page
43
- Dynamic: license
44
- Dynamic: license-file
45
- Dynamic: maintainer
46
- Dynamic: maintainer-email
47
- Dynamic: provides-extra
48
- Dynamic: requires-dist
49
- Dynamic: requires-python
50
- Dynamic: summary
51
-
52
- # Welcome to `pymc-extras`
53
- <a href="https://gitpod.io/#https://github.com/pymc-devs/pymc-extras">
54
- <img
55
- src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
56
- alt="Contribute with Gitpod"
57
- />
58
- </a>
59
- <img
60
- src="https://codecov.io/gh/pymc-devs/pymc-extras/branch/main/graph/badge.svg"
61
- alt="Codecov Badge"
62
- />
63
-
64
- 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.
65
- 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.
66
- 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.
67
- 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.
68
-
69
- 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.
70
- 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.
71
-
72
- `pymc-extras` would be designed to mirror the namespaces in `pymc` to make usage and migration as easy as possible.
73
- For example, a `ParabolicFractal` distribution could be used analogously to those in `pymc`:
74
-
75
- ```python
76
- import pymc as pm
77
- import pymc_extras as pmx
78
-
79
- with pm.Model():
80
- alpha = pmx.ParabolicFractal('alpha', b=1, c=1)
81
-
82
- ...
83
-
84
- ```
85
-
86
- ## Questions
87
-
88
- ### What belongs in `pymc-extras`?
89
-
90
- - newly-implemented statistical methods, for example step methods or model construction helpers
91
- - distributions that are tricky to sample from or test
92
- - infrequently-used fitting methods or distributions
93
- - any code that requires additional optimization before it can be used in practice
94
-
95
-
96
- ### What does not belong in `pymc-extras`?
97
- - Case studies
98
- - Implementations that cannot be applied generically, for example because they are tied to variables from a toy example
99
-
100
-
101
- ### Should there be more than one add-on repository?
102
-
103
- 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?
104
- 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.
105
-
106
-
107
- ### Unanswered questions & ToDos
108
- This project is still young and many things have not been answered or implemented.
109
- Please get involved!
110
-
111
- * What are guidelines for organizing submodules?
112
- * 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.