From 43b173382247d5fb94db168e9931f47cd46736d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=B8=D1=85=D0=BE=D0=BC=D0=B8=D1=80=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90=D0=BB=D0=B5?= =?UTF-8?q?=D0=BA=D1=81=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 9 Oct 2023 11:48:01 +0300 Subject: [PATCH] Fixed linalg error --- lightautoml/addons/hypex/algorithms/faiss_matcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightautoml/addons/hypex/algorithms/faiss_matcher.py b/lightautoml/addons/hypex/algorithms/faiss_matcher.py index 95937e23..f6320307 100644 --- a/lightautoml/addons/hypex/algorithms/faiss_matcher.py +++ b/lightautoml/addons/hypex/algorithms/faiss_matcher.py @@ -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)