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

Improve QR-algorithm stability #136

Merged
merged 7 commits into from
Feb 17, 2024

Conversation

haampie
Copy link
Member

@haampie haampie commented Feb 15, 2024

Previously a perfect single shift was used in the 2x2 case of real eigenvalues, which can be disastrous for ill-conditioned eigenvalues.

The new implementation considers 2x2 blocks converged whether complex conjugate or real, and upper triangularizes it in case of real eigenvalues in a much more stable way. The most stable rotation is picked (there's a choice in case of two distinct eigenvalues), plus some formula manipulations and scaling tricks are applied.

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2076220) 95.21% compared to head (60af40b) 95.47%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   95.21%   95.47%   +0.25%     
==========================================
  Files          10       10              
  Lines         815      839      +24     
==========================================
+ Hits          776      801      +25     
+ Misses         39       38       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@haampie haampie mentioned this pull request Feb 16, 2024
@haampie haampie merged commit b03928d into JuliaLinearAlgebra:master Feb 17, 2024
13 checks passed
@haampie haampie deleted the fix/qr-algorithm-stability branch February 17, 2024 21:50
haampie added a commit that referenced this pull request Feb 17, 2024
Previously a perfect single shift was used in the 2x2 case of real eigenvalues, which can be disastrous for ill-conditioned eigenvalues.

The new implementation considers 2x2 blocks converged whether complex conjugate or real, and upper triangularizes it in case of real eigenvalues in a much more stable way. The most stable rotation is picked (there's a choice in case of two distinct eigenvalues), plus some formula manipulations and scaling tricks are applied.
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

Successfully merging this pull request may close these issues.

1 participant