Say the data has the following form: So the model is represented as: f_{\mathbf{w},b}(\mathbf{x}^{(i)}) = g(\mathbf{w} \cdot \mathbf{x}^{(i)} + b) \tag{1} and the sigmoid function is: and is the vector dot product:

  • We interpret the output of the model () as the probability that given and parameterized by and .

  • Therefore, to get a final prediction ( or ) from the logistic regression model, we can use the following heuristic -

    if, , predict if, , predict

Decision Boundary Logistic Regression Cost Function