From bd3cb4c9953e72107b4f3e730c083764ee8142bd Mon Sep 17 00:00:00 2001 From: RobertSamoilescu Date: Fri, 6 Dec 2024 13:17:44 +0000 Subject: [PATCH] Replaced eigvals with subset_by_index (#913) --- alibi_detect/od/mahalanobis.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alibi_detect/od/mahalanobis.py b/alibi_detect/od/mahalanobis.py index d963d2ff3..f217e6985 100644 --- a/alibi_detect/od/mahalanobis.py +++ b/alibi_detect/od/mahalanobis.py @@ -269,7 +269,7 @@ def score(self, X: np.ndarray) -> np.ndarray: cov_batch = (n - 1.) / (n + max(1, n_batch - 1.)) * self.C + 1. / (n + max(1, n_batch - 1.)) * B.sum(axis=0) # PCA - eigvals, eigvects = eigh(cov_batch, eigvals=(n_params - n_components, n_params - 1)) + _, eigvects = eigh(cov_batch, subset_by_index=(n_params - n_components, n_params - 1)) # projections proj_x = np.matmul(X, eigvects) diff --git a/setup.py b/setup.py index dc36455d9..354ac47fc 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ def readme(): "pandas>=1.0.0, <3.0.0", "Pillow>=5.4.1, <11.0.0", "opencv-python>=3.2.0, <5.0.0", - "scipy>=1.3.0, <2.0.0", + "scipy>=1.5.0, <2.0.0", 'scikit-image>=0.19, <0.23', "scikit-learn>=0.20.2, <2.0.0", "transformers>=4.0.0, <5.0.0",