简体   繁体   中英

Confused about the decision boundary of logistic regression binary classifier

I haven't been able to solve a question. In the question, the hypothesis function, H, is given by

H(x) = g(B0 + B1*X1 + B2*X2)

where

B0 = 6, B1 = 0 and B2 = -1

And I am given these figures:

在此处输入图片说明

And the question is that which figure will represent the decision boundary given by the classifier. The answer is figure B but I don't quite get why. Can someone explain to me why this is so?

If you've taken the threshold value of 0.5 to classify, what you get is:

g(z) > 0.5 ---> predict y = 1 => z > 0
g(z) < 0.5 ---> predict y = 0 => z < 0
for the first case if we take the relation z > 0, we get:
B0 + B1*X1 + B2*X2 > 0
6 + 0*x1 + (-1)*X2 > 0
X2 < 6

Therefore, with X2 < 6 you must predict y = 1 and with X2 > 6 you must predict y = 0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM