Assignment 7 - SGD, logZ done (test cases passed)