Machine Learning Logistics Regression

I currently studying the first specialization course by professor Andrew. In logistics regression I got confused on decision boundary and sigmoid plot when use which and what is the difference between them.

Appreciate the help.

Thanks

1 Like

Hey @SAlharbi

I hope you are doing well!

Sigmoid is a function that maps the input into a value between 0 and 1, which we can interpret as the probability of belonging to class 1. But we need to predict classes, which means turning these probabilities into 0 or 1 for the classification task. The sigmoid curve tells us how “likely” something belongs to one class. For example, if the output is close to 0, the model is saying “I’m very sure this is class 0,” and if it’s close to 1, it’s saying “I’m very sure this is class 1.” Around 0.5, the model is uncertain. So, the sigmoid is about showing probabilities.

The decision boundary is different. Instead of showing probabilities, it shows where the model makes the actual choice between classes and is defined by a threshold on the sigmoid output (commonly 0.5). Imagine drawing a line on a graph that separates class 0 on one side and class 1 on the other. That line (or curve, in some models) is the decision boundary. On one side of the boundary, the model predicts 0; on the other side, it predicts 1. So while the sigmoid tells us “how confident” the model is, the decision boundary tells us “where the cutoff between classes happens.”

Let me know if there are any other questions!

2 Likes

Thanks Ali for your help, it is clear now.

1 Like