You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Approximately compute the eigendecomposition of a symmetric matrix by performing the QR algorithm.
295
+
"""Approximately compute the eigendecomposition of a symmetric matrix by performing the QR algorithm.
309
296
310
297
Given an initial estimate of the eigenvectors Q of matrix A, a power iteration and a QR decomposition is performed each iteration, i.e. Q, _ <- QR(A @ Q).
311
298
When the initial estimate is the zero matrix, the eigendecomposition is computed using _eigh_eigenvalue_decomposition.
312
299
313
-
Note that if the approximate eigenvalues criterion is already below or equal to the tolerance given the initial eigenvectors_estimate, the QR iterations will be skipped.
300
+
Note that if the criterion based on the estimated eigenvalues is already below or equal to the tolerance given the initial eigenvectors_estimate, the QR iterations will be skipped.
314
301
315
302
Args:
316
303
A (Tensor): The symmetric input matrix.
@@ -320,35 +307,30 @@ def _qr_algorithm(
320
307
(Default: 0.01)
321
308
322
309
Returns:
323
-
tuple[Tensor, Tensor]: The approximate eigenvalues and eigenvectors of the input matrix A.
310
+
tuple[Tensor, Tensor]: The estimated eigenvalues and eigenvectors of the input matrix A.
# NOTE: This will skip the QR iterations if the approximate eigenvalues criterion is already below or equal to the tolerance given the initial eigenvectors_estimate.
320
+
# NOTE: This will skip the QR iterations if the criterion is already below or equal to the tolerance given the initial eigenvectors_estimate.
"""Configuration for eigenvalue decomposition via QR algorithm.
55
55
56
-
Determines whether the QR algorithm has converged based on the approximate eigenvalues Q^T A Q =: B, where Q is the last computed eigenvectors and A is the current Kronecker factor.
57
-
The approximate eigenvalues update criterion is then defined as ||B - diag(B)||_F <= tolerance * ||B||_F.
56
+
Determines whether the QR algorithm has converged based on the estimated eigenvalues Q^T A Q =: B, where Q is the last computed eigenvectors and A is the current Kronecker factor.
57
+
The convergence criterion based on the estimated eigenvalues is then defined as ||B - diag(B)||_F <= tolerance * ||B||_F.
58
58
The tolerance hyperparameter should therefore be in the interval [0.0, 1.0].
59
59
60
-
Note that if the approximate eigenvalues criterion is already below or equal to the tolerance given the initial eigenvectors_estimate, the QR iterations will be skipped.
60
+
Note that if the criterion based on the estimated eigenvalues is already below or equal to the tolerance given the initial eigenvectors_estimate, the QR iterations will be skipped.
61
61
62
62
This convergence criterion can be motivated by considering A' = Q diag(B) Q^T as an approximation of A.
63
63
We have ||A - A'||_F = ||A - Q diag(B) Q^T||_F = ||Q^T A Q - diag(B)||_F = ||B - diag(B)||_F.
0 commit comments