Adding Gaussian estimation
Adding threshold selection
Adding cost function
Adding gradients
Adding regularized cost function
Adding regulation to gradients