Skip to content

Commit

Permalink
make note to the power method as it is not yet perfect and general
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Weber authored and Lucas Weber committed Jun 5, 2024
1 parent 63def8f commit 5df8f3c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions changepoynt/utils/linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5df8f3c

Please sign in to comment.