Skip to content

Commit

Permalink
owpca: Ensure PCs are consistenly oriented with sklearn in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlin-policar committed May 31, 2024
1 parent 6fc93d8 commit 971cd90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Orange/widgets/unsupervised/tests/test_owpca.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def test_normalized_gives_correct_result(self, prepare_table):
x = (x - x.mean(0)) / x.std(0)
U, S, Va = np.linalg.svd(x)
U, S, Va = U[:, :2], S[:2], Va[:2]
U, Va = svd_flip(U, Va)
U, Va = svd_flip(U, Va, u_based_decision=False)
pca_embedding = U * S

np.testing.assert_almost_equal(widget_result.X, pca_embedding)
Expand Down

0 comments on commit 971cd90

Please sign in to comment.