Solving the decision boundary
The introduction of cost function
Since the purpose of cost function is to find the true value of all samples - a minimum sum of squares of the predicted values, but due to the presence logistic regression sigmoid function, such that the normal function of the cost can not be lowered with a gradient method for solving the optimal solution, so according to the sigmoid function, to adjust the cost function, to obtain the following equation