简体   繁体   English

对逻辑回归二元分类器的决策边界感到困惑

[英]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由下式给出

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

where 哪里

B0 = 6, B1 = 0 and B2 = -1 B0 = 6,B1 = 0,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. 答案是图B,但我不明白为什么。 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: 如果您使用阈值0.5进行分类,则得到的是:

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 因此,对于X2 <6,您必须预测y = 1,对于X2> 6,您必须预测y = 0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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