diff --git a/bnpm/tests/test_PCA.py b/bnpm/tests/test_PCA.py index 6de6c92..aaf83b9 100644 --- a/bnpm/tests/test_PCA.py +++ b/bnpm/tests/test_PCA.py @@ -12,7 +12,7 @@ def test_fit_transform_equivalence(): n_components = 5 - pca_sklearn = sklearnPCA(n_components=n_components).fit(X_np) + pca_sklearn = sklearnPCA(n_components=n_components, svd_solver='full').fit(X_np) pca_torch = PCA(n_components=n_components).fit(X_torch) # Compare the principal components directly @@ -179,4 +179,4 @@ def test_n_components_effect(): pca_n.fit(X_torch) assert pca_n.components_.shape[0] == n, f"PCA with n_components={n} did not produce the correct number of components." - assert pca_n.explained_variance_.shape[0] == n, f"PCA with n_components={n} did not produce the correct number of explained variances." \ No newline at end of file + assert pca_n.explained_variance_.shape[0] == n, f"PCA with n_components={n} did not produce the correct number of explained variances."