In the picture above, I don’t understand why y_hat = 1 inside the ellipse or more complex shaped decision boundary and y_hat = 0 outside both decision boundaries, instead of the other way around. Can someone pls help out and explain, thanks?

Hello @chiz, thanks for the question!

Quick maths: at x_1=x_2=0 which is inside the ellipse, z is evaluated to be equal to b, and if b>0, then z>0, and the sigmoid function g returns a value that is >0.5, and given 0.5 as a threshold line, your prediction for x_1=x_2=0 will be \hat{y}=1. However, if b<0, following the same logic and the same threshold line, your prediction at x_1=x_2=0 will be \hat{y}=0.

So the answer is, **particularly at x_1=x_2=0**, whether it is \hat{y}=1 or \hat{y}=0 depends on b in these cases and we know the slide didn’t explicity say what b is, but b appears to be positive in both cases If you go one slide back at 8:06, b=-1, so at x_1=x_2=0, it should be predicted \hat{y}=0 and **by extension**, anything inside that circle is \hat{y}=0.

I hope you get the idea of how to think about it. I took the convenience to use x_1=x_2=0 and by extension all other points on the same side of the boundary as the point x_1=x_2=0 belong to the same class.

Yes it makes sense now (sign of b matters), thanks for the explanation.