Ex4 regularized cost