diff --git a/data/lhiding-loss-vs-m-pkl b/data/lhiding-loss-vs-m-pkl index 402fba0..9be8aee 100644 Binary files a/data/lhiding-loss-vs-m-pkl and b/data/lhiding-loss-vs-m-pkl differ diff --git a/figs/lhiding-loss-vs-m.pdf b/figs/lhiding-loss-vs-m.pdf index ab648e2..85b889c 100644 Binary files a/figs/lhiding-loss-vs-m.pdf and b/figs/lhiding-loss-vs-m.pdf differ diff --git a/robustlib.py b/robustlib.py index 59f994a..0c3e8c8 100644 --- a/robustlib.py +++ b/robustlib.py @@ -214,7 +214,8 @@ def alg(self, S, indicator): eps_m = round(eps * m) for i in range(nItrs): if self.sparse: - Sigma_w = (X.T @ spdiags(w, 0, m, m) @ X) - (X.T @ np.outer(w, w) @ X) + Xw = X.T @ w + Sigma_w = (X.T @ spdiags(w, 0, m, m) @ X) - (Xw @ Xw.T) Sigma_w_minus_I = Sigma_w - np.eye(d) #find indices of largest k entries of each row of Sigma_w_minus_I largest_k_each_row_index_array = np.argpartition(Sigma_w_minus_I, kth=-k, axis=-1)[:, -k:]