Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问lesson1 逻辑回归里面这行代码的数学原理是什么? #4

Open
wongsihan opened this issue Feb 13, 2021 · 1 comment

Comments

@wongsihan
Copy link

plot_y = (-w0 * plot_x - plot_b) / w1

这里plot画出的是两种类别的分割线,没明白y为什么要这么取值,nn.linear的两个权重w0 w1分别有什么含义呢?

@zhangxiann
Copy link
Owner

你可以反推一下:
plot_y = (-w0 * plot_x - plot_b) / w1 可以化为 w1 * plot_y + w0 * plot_x + plot_b = 0

这就是逻辑回归的公式中的 f(x)
image
附上逻辑回归公式:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants