self.q *= 1 - regularization
self.q += learning_rate * np.dot(e.T, self.p)
self.p *= 1 - regularization
self.p += p_temp
Scipy - how to further optimize sparse matrix code for stochastic gradient descent