Skip to content
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

LA.eig(sigma) gives complex eigenvalues for symmetrical sigma #12

Open
tamkaho opened this issue Dec 10, 2019 · 0 comments
Open

LA.eig(sigma) gives complex eigenvalues for symmetrical sigma #12

tamkaho opened this issue Dec 10, 2019 · 0 comments

Comments

@tamkaho
Copy link

tamkaho commented Dec 10, 2019

In line 293 of contrastive/init.py:
w, v = LA.eig(sigma)

It seems that np.linalg.eig sometimes gives complex eigenvalues due to truncation error even though my sigmas are symmetrical matrices. Would it be better to replace the line with the following?

w, v = np.linalg.eigh(sigma)

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

1 participant