我绘制了决策边界: 我的逻辑回归,但我不清楚如何解释它。我怎么知道边界的哪一边y = 1,哪一边y = 0?
这是我的代码:
model <- glm (left ~ satisfaction_level + time_spend_company, family = binomial(link = 'logit'), data = data)
coefs = coef(model)
summary(model)
(x = c(min(data[,1])-2, max(data[,1])+2))
(y = c((-1/coefs[3]) * (coefs[2] * x + coefs[1])))
lines(x, y, col="black", lwd=2)
有人可以解释一下吗?
谢谢!
P.S。我使用了Kaggle HR data set和split:
data <- HR.2 [1:12000,]
test.data <- HR.2 [12001:14999,]