cost function regularization simplified