Skip to content

Commit

Permalink
fix error with the svd sst where the score calculation was not correct
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Weber authored and Lucas Weber committed Sep 2, 2024
1 parent a7295c6 commit 7f66041
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions changepoynt/algorithms/sst.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def _rayleigh_singular_value_decomposition(hankel_past: np.ndarray, hankel_futur

# compute the projection distance
alpha = singvecs_past.T @ eigvec_future
return 1 - alpha.sum(), eigvec_future
return 1 - alpha.T @ alpha, eigvec_future


def _facebook_random_singular_value_decomposition(hankel_past: np.ndarray, hankel_future: np.ndarray, x0: np.ndarray,
Expand Down Expand Up @@ -390,7 +390,6 @@ def _random_singular_value_decomposition(hankel_past: np.ndarray, hankel_future:
return 1 - alpha.T @ alpha, eigvec_future



def main():
"""This function is not intended for users, but for quick testing during development."""
from time import time
Expand All @@ -413,7 +412,7 @@ def main():
start = time()
ika_sst.transform(x)
# print((time() - start) / (length * 3))
svd_sst.transform(x)
print(svd_sst.transform(x))
rsvd_sst.transform(x)
fbrsvd_sst.transform(x)

Expand Down

0 comments on commit 7f66041

Please sign in to comment.