Skip to content

Instantly share code, notes, and snippets.

@lastlegion
Created October 10, 2013 06:05
Show Gist options
  • Save lastlegion/6913768 to your computer and use it in GitHub Desktop.
Save lastlegion/6913768 to your computer and use it in GitHub Desktop.
plotting decision boundary
boundary_x = [-1, -0.5,0,0.5,1]
boundary_y = [None]*5
for i in range(0,5):
boundary_y[i] = (boundary_x[i]*(w.item(2))/(1-w.item(1))) + (w.item(0)/(1-w.item(1)))
plt.plot(boundary_x, boundary_y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment