Decision Boundary vs Threshold in Logistic Regression

Hey guys, I was trying to understand the relationship between the decision boundary and threshold. In week 3, we say that the decision boundary is defined by when w.x+b=0 and this is when g(z) >=0.5

What confuses me here is, say if i choose the threshold as 0.2 where y_pred = 1 when g(z)>=0.2. Will this change the equation for my decision boundary?

Or are these 2 independent and I’m confusing the decision boundary and threshold?

Please see the image below for reference

Question 2:
Why is y_pred = 1 here inside the ellipse?

Yes, it will. the boundary will now be the locus of points where the value is 0.2, instead of 0.5.

Note that there is almost never a good reason for using a threshold other than >= 0.5.

1 Like

Thanks for explaining that. A lot of the posts i read on reddit about this had confused me more as well but this really helps!

I recommend you come to the forum first with your questions. There are lots of community members and mentors who know this material very well.

1 Like