freealg 0.6.2__tar.gz → 0.6.3__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 (37) hide show
  1. {freealg-0.6.2 → freealg-0.6.3}/PKG-INFO +9 -11
  2. {freealg-0.6.2 → freealg-0.6.3}/README.rst +8 -10
  3. freealg-0.6.3/freealg/__version__.py +1 -0
  4. {freealg-0.6.2 → freealg-0.6.3}/freealg/_decompress.py +0 -10
  5. {freealg-0.6.2 → freealg-0.6.3}/freealg/_pade.py +0 -1
  6. {freealg-0.6.2 → freealg-0.6.3}/freealg/_util.py +21 -10
  7. {freealg-0.6.2 → freealg-0.6.3}/freealg/distributions/_marchenko_pastur.py +2 -2
  8. {freealg-0.6.2 → freealg-0.6.3}/freealg/freeform.py +0 -30
  9. {freealg-0.6.2 → freealg-0.6.3}/freealg.egg-info/PKG-INFO +9 -11
  10. freealg-0.6.2/freealg/__version__.py +0 -1
  11. {freealg-0.6.2 → freealg-0.6.3}/AUTHORS.txt +0 -0
  12. {freealg-0.6.2 → freealg-0.6.3}/CHANGELOG.rst +0 -0
  13. {freealg-0.6.2 → freealg-0.6.3}/LICENSE.txt +0 -0
  14. {freealg-0.6.2 → freealg-0.6.3}/MANIFEST.in +0 -0
  15. {freealg-0.6.2 → freealg-0.6.3}/freealg/__init__.py +0 -0
  16. {freealg-0.6.2 → freealg-0.6.3}/freealg/_chebyshev.py +0 -0
  17. {freealg-0.6.2 → freealg-0.6.3}/freealg/_damp.py +0 -0
  18. {freealg-0.6.2 → freealg-0.6.3}/freealg/_jacobi.py +0 -0
  19. {freealg-0.6.2 → freealg-0.6.3}/freealg/_linalg.py +0 -0
  20. {freealg-0.6.2 → freealg-0.6.3}/freealg/_plot_util.py +0 -0
  21. {freealg-0.6.2 → freealg-0.6.3}/freealg/_sample.py +0 -0
  22. {freealg-0.6.2 → freealg-0.6.3}/freealg/_series.py +0 -0
  23. {freealg-0.6.2 → freealg-0.6.3}/freealg/_support.py +0 -0
  24. {freealg-0.6.2 → freealg-0.6.3}/freealg/distributions/__init__.py +0 -0
  25. {freealg-0.6.2 → freealg-0.6.3}/freealg/distributions/_kesten_mckay.py +0 -0
  26. {freealg-0.6.2 → freealg-0.6.3}/freealg/distributions/_meixner.py +0 -0
  27. {freealg-0.6.2 → freealg-0.6.3}/freealg/distributions/_wachter.py +0 -0
  28. {freealg-0.6.2 → freealg-0.6.3}/freealg/distributions/_wigner.py +0 -0
  29. {freealg-0.6.2 → freealg-0.6.3}/freealg.egg-info/SOURCES.txt +0 -0
  30. {freealg-0.6.2 → freealg-0.6.3}/freealg.egg-info/dependency_links.txt +0 -0
  31. {freealg-0.6.2 → freealg-0.6.3}/freealg.egg-info/not-zip-safe +0 -0
  32. {freealg-0.6.2 → freealg-0.6.3}/freealg.egg-info/requires.txt +0 -0
  33. {freealg-0.6.2 → freealg-0.6.3}/freealg.egg-info/top_level.txt +0 -0
  34. {freealg-0.6.2 → freealg-0.6.3}/pyproject.toml +0 -0
  35. {freealg-0.6.2 → freealg-0.6.3}/requirements.txt +0 -0
  36. {freealg-0.6.2 → freealg-0.6.3}/setup.cfg +0 -0
  37. {freealg-0.6.2 → freealg-0.6.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: freealg
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: Free probability for large matrices
5
5
  Home-page: https://github.com/ameli/freealg
6
6
  Download-URL: https://github.com/ameli/freealg/archive/main.zip
@@ -163,19 +163,17 @@ code, we also welcome feature requests and bug reports.
163
163
  How to Cite
164
164
  ===========
165
165
 
166
- If you use this work, please cite our `arXiv paper <https://arxiv.org/abs/2506.11994>`__.
166
+ If you use this work, please cite our `paper <https://openreview.net/pdf?id=2CeGVUpOd7>`__.
167
167
 
168
168
  .. code::
169
169
 
170
- @article{spectral2025,
171
- title={Spectral Estimation with Free Decompression},
172
- author={Siavash Ameli and Chris van der Heide and Liam Hodgkinson and Michael W. Mahoney},
173
- year={2025},
174
- eprint={2506.11994},
175
- archivePrefix={arXiv},
176
- primaryClass={stat.ML},
177
- url={https://arxiv.org/abs/2506.11994},
178
- journal={arXiv preprint arXiv:2506.11994},
170
+ @inproceedings{
171
+ AMELI-2025,
172
+ title={Spectral Estimation with Free Decompression},
173
+ author={Siavash Ameli and Chris van der Heide and Liam Hodgkinson and Michael W. Mahoney},
174
+ booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
175
+ year={2025},
176
+ url={https://openreview.net/forum?id=2CeGVUpOd7}
179
177
  }
180
178
 
181
179
 
@@ -87,19 +87,17 @@ code, we also welcome feature requests and bug reports.
87
87
  How to Cite
88
88
  ===========
89
89
 
90
- If you use this work, please cite our `arXiv paper <https://arxiv.org/abs/2506.11994>`__.
90
+ If you use this work, please cite our `paper <https://openreview.net/pdf?id=2CeGVUpOd7>`__.
91
91
 
92
92
  .. code::
93
93
 
94
- @article{spectral2025,
95
- title={Spectral Estimation with Free Decompression},
96
- author={Siavash Ameli and Chris van der Heide and Liam Hodgkinson and Michael W. Mahoney},
97
- year={2025},
98
- eprint={2506.11994},
99
- archivePrefix={arXiv},
100
- primaryClass={stat.ML},
101
- url={https://arxiv.org/abs/2506.11994},
102
- journal={arXiv preprint arXiv:2506.11994},
94
+ @inproceedings{
95
+ AMELI-2025,
96
+ title={Spectral Estimation with Free Decompression},
97
+ author={Siavash Ameli and Chris van der Heide and Liam Hodgkinson and Michael W. Mahoney},
98
+ booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
99
+ year={2025},
100
+ url={https://openreview.net/forum?id=2CeGVUpOd7}
103
101
  }
104
102
 
105
103
 
@@ -0,0 +1 @@
1
+ __version__ = "0.6.3"
@@ -855,16 +855,6 @@ def decompress(freeform, alpha, x, roots_init=None, method='newton',
855
855
  density
856
856
  stieltjes
857
857
 
858
- Notes
859
- -----
860
-
861
- Work in progress.
862
-
863
- References
864
- ----------
865
-
866
- .. [1] tbd
867
-
868
858
  Examples
869
859
  --------
870
860
 
@@ -13,7 +13,6 @@
13
13
 
14
14
  import numpy
15
15
  from numpy.linalg import lstsq
16
- from itertools import product
17
16
  from scipy.optimize import least_squares, differential_evolution
18
17
 
19
18
  __all__ = ['fit_pade', 'eval_pade']
@@ -127,26 +127,37 @@ def kde(eig, xs, lam_m, lam_p, h, kernel='beta', plot=False):
127
127
  freealg.supp
128
128
  freealg.sample
129
129
 
130
+ References
131
+ ----------
132
+
133
+ .. [1] `R-package documentation for Beta kernel
134
+ <https://search.r-project.org/CRAN/refmans/DELTD/html/Beta.html>`__
135
+
136
+ .. [2] Chen, S. X. (1999). Beta Kernel estimators for density functions.
137
+ *Computational Statistics and Data Analysis* 31 p. 131--145.
138
+
130
139
  Notes
131
140
  -----
132
141
 
133
- In Beta kernel density estimation, the shape parameters "a" and "b" of the
134
- Beta(a, b)) distribution are computed for each data point "u" as:
142
+ In Beta kernel density estimation, the shape parameters :math:`a` and
143
+ :math:`b` of the :math:`\\mathrm{Beta}(a, b)` distribution are computed
144
+ for each data point :math:`u` as:
145
+
146
+ .. math::
135
147
 
136
148
  a = (u / h) + 1.0
137
149
  b = ((1.0 - u) / h) + 1.0
138
150
 
139
- This is a standard way of using Beta kernel (see R-package documentation:
140
- https://search.r-project.org/CRAN/refmans/DELTD/html/Beta.html
151
+ This is a standard way of using Beta kernel (see R-package documentation
152
+ [1]_). These equations are derived from *moment matching* method, where
141
153
 
142
- These equations are derived from "moment matching" method, where
154
+ .. math::
143
155
 
144
- Mean(Beta(a,b)) = u
145
- Var(Beta(a,b)) = (1-u) u h
156
+ \\mathrm{Mean}(\\mathrm{Beta}(a,b)) = u
157
+ \\mathrm{Var}(\\mathrm{Beta}(a,b)) = (1-u) u h
146
158
 
147
- Solving these two equations for "a" and "b" yields the relations above.
148
- See paper (page 134)
149
- https://www.songxichen.com/Uploads/Files/Publication/Chen-CSD-99.pdf
159
+ Solving these two equations for :math:`a` and :math:`b` yields the
160
+ relations above. See [2]_ (page 134).
150
161
  """
151
162
 
152
163
  if kernel == 'gaussian':
@@ -283,8 +283,8 @@ class MarchenkoPastur(object):
283
283
  if numpy.any(not_mask):
284
284
 
285
285
  sign = -1 if alt_branch else 1
286
- A = self.lam * sigma**2 * z
287
- B = z - sigma**2 * (1 - self.lam)
286
+ A = self.lam * sigma**2 * z[not_mask]
287
+ B = z[not_mask] - sigma**2 * (1 - self.lam)
288
288
  D = B**2 - 4 * A
289
289
  sqrtD = numpy.sqrt(D)
290
290
  m1 = (-B + sqrtD) / (2 * A)
@@ -74,16 +74,6 @@ class FreeForm(object):
74
74
  Parameters for the :func:`supp` function can also be prescribed
75
75
  here when ``support=None``.
76
76
 
77
- Notes
78
- -----
79
-
80
- TBD
81
-
82
- References
83
- ----------
84
-
85
- .. [1] Reference.
86
-
87
77
  Attributes
88
78
  ----------
89
79
 
@@ -749,16 +739,6 @@ class FreeForm(object):
749
739
  density
750
740
  hilbert
751
741
 
752
- Notes
753
- -----
754
-
755
- Notes.
756
-
757
- References
758
- ----------
759
-
760
- .. [1] tbd
761
-
762
742
  Examples
763
743
  --------
764
744
 
@@ -973,16 +953,6 @@ class FreeForm(object):
973
953
  density
974
954
  stieltjes
975
955
 
976
- Notes
977
- -----
978
-
979
- Work in progress.
980
-
981
- References
982
- ----------
983
-
984
- .. [1] tbd
985
-
986
956
  Examples
987
957
  --------
988
958
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: freealg
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: Free probability for large matrices
5
5
  Home-page: https://github.com/ameli/freealg
6
6
  Download-URL: https://github.com/ameli/freealg/archive/main.zip
@@ -163,19 +163,17 @@ code, we also welcome feature requests and bug reports.
163
163
  How to Cite
164
164
  ===========
165
165
 
166
- If you use this work, please cite our `arXiv paper <https://arxiv.org/abs/2506.11994>`__.
166
+ If you use this work, please cite our `paper <https://openreview.net/pdf?id=2CeGVUpOd7>`__.
167
167
 
168
168
  .. code::
169
169
 
170
- @article{spectral2025,
171
- title={Spectral Estimation with Free Decompression},
172
- author={Siavash Ameli and Chris van der Heide and Liam Hodgkinson and Michael W. Mahoney},
173
- year={2025},
174
- eprint={2506.11994},
175
- archivePrefix={arXiv},
176
- primaryClass={stat.ML},
177
- url={https://arxiv.org/abs/2506.11994},
178
- journal={arXiv preprint arXiv:2506.11994},
170
+ @inproceedings{
171
+ AMELI-2025,
172
+ title={Spectral Estimation with Free Decompression},
173
+ author={Siavash Ameli and Chris van der Heide and Liam Hodgkinson and Michael W. Mahoney},
174
+ booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
175
+ year={2025},
176
+ url={https://openreview.net/forum?id=2CeGVUpOd7}
179
177
  }
180
178
 
181
179
 
@@ -1 +0,0 @@
1
- __version__ = "0.6.2"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes