For logistic regression, the predicted value is calculated as follows:
Let's suppose that .
So now:
The preceding relationship can be graphically shown as follows:
Note that if z is large, σ (z) will equal 1. If z is very small or a large negative number, σ (z) will equal 0. So, the objective of logistic regression is to find the correct values for w and j.
Logistic regression is named after the function that is used to formulate it, called the logistic or sigmoid function.