We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
def getshow(): # Positive sample all_x = X[:, 0] all_y = X[:, 1] # Negative sample all_negative_x = [1, 0] all_negative_y = [1, 1] # Calculate the slope and intercept of the dividing line k = -W[2] / W[3] b = -(W[0] + W[1]) / W[3] xdata = np.linspace(0, 5) plt.figure() plt.plot(xdata, xdata * k + b, 'r') plt.plot(all_x, all_y, 'bo') plt.plot(all_negative_x, all_negative_y, 'yo') plt.show()
在书中第15页。其中不存在W[2]和W[3],所以k和b无法求解
The text was updated successfully, but these errors were encountered:
有的噢,数据的维度就是4维的,W也是4维的,你把数据带进去就可以得到直线的公式了
Sorry, something went wrong.
No branches or pull requests
在书中第15页。其中不存在W[2]和W[3],所以k和b无法求解
The text was updated successfully, but these errors were encountered: