freealg 0.6.2__py3-none-any.whl → 0.6.3__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.
freealg/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.6.2"
1
+ __version__ = "0.6.3"
freealg/_decompress.py CHANGED
@@ -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
 
freealg/_pade.py CHANGED
@@ -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']
freealg/_util.py CHANGED
@@ -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)
freealg/freeform.py CHANGED
@@ -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
@@ -142,19 +142,17 @@ code, we also welcome feature requests and bug reports.
142
142
  How to Cite
143
143
  ===========
144
144
 
145
- If you use this work, please cite our `arXiv paper <https://arxiv.org/abs/2506.11994>`__.
145
+ If you use this work, please cite our `paper <https://openreview.net/pdf?id=2CeGVUpOd7>`__.
146
146
 
147
147
  .. code::
148
148
 
149
- @article{spectral2025,
150
- title={Spectral Estimation with Free Decompression},
151
- author={Siavash Ameli and Chris van der Heide and Liam Hodgkinson and Michael W. Mahoney},
152
- year={2025},
153
- eprint={2506.11994},
154
- archivePrefix={arXiv},
155
- primaryClass={stat.ML},
156
- url={https://arxiv.org/abs/2506.11994},
157
- journal={arXiv preprint arXiv:2506.11994},
149
+ @inproceedings{
150
+ AMELI-2025,
151
+ title={Spectral Estimation with Free Decompression},
152
+ author={Siavash Ameli and Chris van der Heide and Liam Hodgkinson and Michael W. Mahoney},
153
+ booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
154
+ year={2025},
155
+ url={https://openreview.net/forum?id=2CeGVUpOd7}
158
156
  }
159
157
 
160
158
 
@@ -1,26 +1,26 @@
1
1
  freealg/__init__.py,sha256=muuYCvlsXjuX1W67YGFca9nFxprFsALLyB3CrJpXFnY,728
2
- freealg/__version__.py,sha256=jFlbxEJFS0G44LE-yXXVSwXACA1J_NyYDk5E20_2zpc,22
2
+ freealg/__version__.py,sha256=zYiFHqR7JwbvdK9dvKrh-RTNfUqjHUwC4CTcFAPVYLc,22
3
3
  freealg/_chebyshev.py,sha256=zkyVA8NLf7uUKlJdLz4ijd_SurdsqUgkA5nHGWSybaE,6916
4
4
  freealg/_damp.py,sha256=k2vtBtWOxQBf4qXaWu_En81lQBXbEO4QbxxWpvuVhdE,1802
5
- freealg/_decompress.py,sha256=bFhQx--uptWJ7OjVwEs_tWYT6mLijBKJ9EbrD24Sbl0,32199
5
+ freealg/_decompress.py,sha256=_i37IToZ6oN9DdLXOM8r4y92EbazzcylhcnWwUOpaj0,32108
6
6
  freealg/_jacobi.py,sha256=z0X6Ws_BEo_h8EQBzDNHGFhLF9F2PUmnGeBVs0bNL7w,10709
7
7
  freealg/_linalg.py,sha256=0BzJNTXiY1VH3OKrCFgbE0QHLgRoKyiILsBWtnygFGc,13141
8
- freealg/_pade.py,sha256=u8BxaD-WX-19nHRf_zlXZU4H2O-9Y48T1Kue5Vl2IGw,10340
8
+ freealg/_pade.py,sha256=_y89r7rVc2E5lgiN_ZjnxzW2IaVevWwpq5ISor2NVOo,10310
9
9
  freealg/_plot_util.py,sha256=GKvmc1wjVGeqoomrULPbzBEt6P86FdoR2idBLYh5EDY,20068
10
10
  freealg/_sample.py,sha256=rhfd_83TCTvvJh8cG8TzEYO4OR8VbtND2YCNtWEhMa8,3205
11
11
  freealg/_series.py,sha256=33LLCUe4svmV0eWyzhP_XClfDzccQHTW9WBJlYlLfHY,11475
12
12
  freealg/_support.py,sha256=nxDa2OFlWBgjD0_1qoSMWG7kub6-GIuxIA04n5bdaYw,6614
13
- freealg/_util.py,sha256=EKKg_1VCo3-juBXFOg4SviFhuvO30VFM3zwXHIJ4qtA,7952
14
- freealg/freeform.py,sha256=Gh-Thc6Xbpcz1bQgQVXDiCIen6lB6K63Qosr-eh73gI,43847
13
+ freealg/_util.py,sha256=fcs18RuWsmWvpSiwvSLFBYNiTLvYkD6LwjeuIGnyV7E,8251
14
+ freealg/freeform.py,sha256=GMlgCqrM-3tb_QZrZszVxC4pGUvQbYtOnbJBkc2PHQg,43544
15
15
  freealg/distributions/__init__.py,sha256=t_yZyEkW_W_tSV9IvgYXtVASxD2BEdiNVXcV2ebMy8M,579
16
16
  freealg/distributions/_kesten_mckay.py,sha256=FB7UtMxkn3Olg6XmjUKrh5njhdttMo6HwW78fDBTDJk,20078
17
- freealg/distributions/_marchenko_pastur.py,sha256=1aNU2uPI5WIdAxmPOeMl9THZVJHKYRTswh68QgUmrbE,17171
17
+ freealg/distributions/_marchenko_pastur.py,sha256=PtmOV9npUcbI1HgjeH8mjGlbYYCdrlNtLuQegO2r4NE,17191
18
18
  freealg/distributions/_meixner.py,sha256=-gDYBShAXxtfe3vY4-2bSvp7QM8uU9eeDC9v_YVNxrk,17579
19
19
  freealg/distributions/_wachter.py,sha256=Kv1qQF1MOFCli5-IDT5lZYRhqRXh4xCugEq7KSYbE4g,17079
20
20
  freealg/distributions/_wigner.py,sha256=FBGhSijbex5oFztnV6laEGAiSWGdn1z9g9lSfhgQ_sQ,16058
21
- freealg-0.6.2.dist-info/licenses/AUTHORS.txt,sha256=0b67Nz4_JgIzUupHJTAZxu5QdSUM_HRM_X_w4xCb17o,30
22
- freealg-0.6.2.dist-info/licenses/LICENSE.txt,sha256=J-EEYEtxb3VVf_Bn1TYfWnpY5lMFIM15iLDDcnaDTPA,1443
23
- freealg-0.6.2.dist-info/METADATA,sha256=WdL5K1KCLaUxT4_c_ZA_Ug1kUE9jLDB6jbLaMbnG3yA,5530
24
- freealg-0.6.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
- freealg-0.6.2.dist-info/top_level.txt,sha256=eR2wrgYwDdnnJ9Zf5PruPqe4kQav0GMvRsqct6y00Q8,8
26
- freealg-0.6.2.dist-info/RECORD,,
21
+ freealg-0.6.3.dist-info/licenses/AUTHORS.txt,sha256=0b67Nz4_JgIzUupHJTAZxu5QdSUM_HRM_X_w4xCb17o,30
22
+ freealg-0.6.3.dist-info/licenses/LICENSE.txt,sha256=J-EEYEtxb3VVf_Bn1TYfWnpY5lMFIM15iLDDcnaDTPA,1443
23
+ freealg-0.6.3.dist-info/METADATA,sha256=FhjParK9WyqcDNCu2OBGe_uVssCT-HZhuM5zm0Yzhyw,5516
24
+ freealg-0.6.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ freealg-0.6.3.dist-info/top_level.txt,sha256=eR2wrgYwDdnnJ9Zf5PruPqe4kQav0GMvRsqct6y00Q8,8
26
+ freealg-0.6.3.dist-info/RECORD,,