KCS: Regularized Cost Function and Sigmoid Gradient (ex4-parts 3 & 4)