Output optimalShrinkage is different for kernel and rie methods
vchz opened this issue · 0 comments
Hi,
Thanks for your package. I wanted to try the optimalShrinkage estimator, but on a random Gaussian Matrix with zero mean and unit variance (ie the null case) the rie method provides what I believe to be an incorrect result, while the kernel method is in agreement with what is expected
I use python 3.9.12.
I downloaded via pip, but then modified the full file pyRMT from the source as the version on pip doesn't contain the kernel estimation.
Maybe I am mistaken about what the rie method should give, but I expect to find the same (modulo the eventual finite size effects) as figure 18 of 'Cleaning large correlation matrices: Tools from Random Matrix Theory' J.Bun et al. This is what I obtain when I look at the spectrum returned by directKernel directly.
X= np.random.normal(0,1,size=(N,p))
a = pyRMT.optimalShrinkage(X, return_covariance = False, method = 'kernel')