Implementation of the gradient descent algorithm to train a sigmoid unit for  binary classification tasks