From 971cd900fed0ca802d479303bd504b08ce1f3091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavlin=20Poli=C4=8Dar?= Date: Fri, 31 May 2024 11:10:37 +0200 Subject: [PATCH] owpca: Ensure PCs are consistenly oriented with sklearn in tests --- Orange/widgets/unsupervised/tests/test_owpca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Orange/widgets/unsupervised/tests/test_owpca.py b/Orange/widgets/unsupervised/tests/test_owpca.py index afb2ab41fc9..6d7d5debee3 100644 --- a/Orange/widgets/unsupervised/tests/test_owpca.py +++ b/Orange/widgets/unsupervised/tests/test_owpca.py @@ -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)