in sketching.py [0:0]
def update_iterate(self, w, lmbda, step_size=1.0):
if self.build_matrix:
if self.S is None:
raise AttributeError("Sample a sketch matrix before updating iterate")
w -= step_size * csr_matrix.dot(
self.S, lmbda
) # S * lmbda --> S should be CSR
else:
if self.cols is None or self.signs is None:
raise AttributeError("Sample a sketch matrix before updating iterate")
for i in range(self.m): # TODO: remove loop or vectorize this step
w[i] -= step_size * self.signs[i] * lmbda[self.cols[i]]
return w