Skip to content

Commit

Permalink
Replaced eigvals with subset_by_index (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertSamoilescu authored Dec 6, 2024
1 parent 31d19a1 commit bd3cb4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion alibi_detect/od/mahalanobis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit bd3cb4c

Please sign in to comment.