Skip to content

Diagonal elements of covariance estimators are 'nan' #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
htapia opened this issue Jun 4, 2024 · 2 comments
Open

Diagonal elements of covariance estimators are 'nan' #71

htapia opened this issue Jun 4, 2024 · 2 comments
Assignees

Comments

@htapia
Copy link

htapia commented Jun 4, 2024

Just found that on the latest version pyspi==1.1.0 (google colab) and a previous version pyspi==1.0.3 (ubuntu)

  1. diagonal entries of calculated covariance matrices like that returned by cov_EmpiricalCovariance, are not 1, which should be due to the fact that data is normalized by default (thus covariance matrices are equal to correlation matrices) in fact they all have 'nan' on the main diagonal.

  2. precision matrix estimators like prec_EmpiricalCovariance also return 'nan' on the main diagonal thus the resulting matrix is not the inverse of the matrix returned by cov_EmpiricalCovariance

Am I doing something wrong?
Is this an issue? Thanks

@joshuabmoore joshuabmoore self-assigned this Jun 4, 2024
@joshuabmoore
Copy link
Collaborator

joshuabmoore commented Jun 5, 2024

Hi @htapia,
Pyspi is specifically designed to compute statistics of pairwise interactions between different processes, rather than self-interactions. Given this focus on pairwise interactions, the diagonal entries of the matrices for each pairwise statistic are intentionally set to be NaNs.

@htapia
Copy link
Author

htapia commented Jun 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants