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

Linear algebra for 2x2 matrix #115

Closed
tky823 opened this issue Aug 3, 2022 · 4 comments
Closed

Linear algebra for 2x2 matrix #115

tky823 opened this issue Aug 3, 2022 · 4 comments
Labels
math Math related issue
Milestone

Comments

@tky823
Copy link
Owner

tky823 commented Aug 3, 2022

Numpy's algorithm of linear algebra is slow when a matrix is 2x2.
We can write down some algorithms naively.

@tky823 tky823 added this to the v0.1.0 milestone Aug 3, 2022
@tky823
Copy link
Owner Author

tky823 commented Aug 5, 2022

np.linalg.inv for 2x2 matrix is slower than naive implementation.

@tky823
Copy link
Owner Author

tky823 commented Aug 5, 2022

np.linalg.cholesky for 2x2 matrix is NOT slower than naive implementation.

@tky823
Copy link
Owner Author

tky823 commented Aug 5, 2022

In "ISS2: An Extension of Iterative Source Steering Algorithm for Majorization-Minimization-Based Independent Vector Analysis, " a closed-form solution of the generalized eigenvalue problem for a 2x2 matrix is introduced, but this causes numerical instability in my experiments.

@tky823
Copy link
Owner Author

tky823 commented Aug 5, 2022

I will use the combination of np.linalg.eigh and np.linalg.cholesky for the generalized eigenvalue problem (for a 2x2 matrix). Naive implementation prevents numerical stability as described in #115 (comment).

Algorithm: https://netlib.org/lapack/lug/node54.html

@tky823 tky823 closed this as completed Aug 6, 2022
@tky823 tky823 added the math Math related issue label Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
math Math related issue
Projects
None yet
Development

No branches or pull requests

1 participant