From 5df8f3c6f780279649c39df9d77a65d339baf4af Mon Sep 17 00:00:00 2001 From: Lucas Weber Date: Wed, 5 Jun 2024 16:25:30 +0200 Subject: [PATCH] make note to the power method as it is not yet perfect and general --- changepoynt/utils/linalg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/changepoynt/utils/linalg.py b/changepoynt/utils/linalg.py index 4850946..244243c 100644 --- a/changepoynt/utils/linalg.py +++ b/changepoynt/utils/linalg.py @@ -26,6 +26,7 @@ def power_method(a_matrix: np.ndarray, x_vector: np.ndarray, n_iterations: int) # go through the iterations and continue to scale the returned vector, so we do not reach extreme values # during the iteration we scale the vector by its maximum as we can than easily extract the eigenvalue + # TODO: This only works for our symmetric correlation matrices but not for any arbitrary matrices a_square = a_matrix.T @ a_matrix for _ in range(n_iterations): # multiplication with a_matrix.T @ a_matrix as can be seen in explanation of