port over stochastic training loop for svms