Skip to content

Commit

Permalink
Fixed linalg error
Browse files Browse the repository at this point in the history
  • Loading branch information
Тихомиров Дмитрий Алексеевич committed Oct 9, 2023
1 parent 7b8e49e commit 43b1733
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightautoml/addons/hypex/algorithms/faiss_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,8 @@ def _transform_to_np(treated: pd.DataFrame, untreated: pd.DataFrame, weights: di

cov = conditional_covariance(xc, xt)

epsilon = 1e-5
cov[cov <= epsilon] = epsilon
epsilon = 1e-3
cov = cov + np.eye(cov.shape[0]) * epsilon

L = np.linalg.cholesky(cov)
mahalanobis_transform = np.linalg.inv(L)
Expand Down

0 comments on commit 43b1733

Please sign in to comment.