Skip to content
Snippets Groups Projects
Commit c777ee7e authored by Fabian Pedregosa's avatar Fabian Pedregosa
Browse files

Nicer support vectors in example plot_separating_hyperplane.py

Idea taken from svm_gui.py
parent 5c3a9eb3
No related branches found
No related tags found
No related merge requests found
...@@ -40,8 +40,10 @@ pl.set_cmap(pl.cm.Paired) ...@@ -40,8 +40,10 @@ pl.set_cmap(pl.cm.Paired)
pl.plot(xx, yy, 'k-') pl.plot(xx, yy, 'k-')
pl.plot(xx, yy_down, 'k--') pl.plot(xx, yy_down, 'k--')
pl.plot(xx, yy_up, 'k--') pl.plot(xx, yy_up, 'k--')
pl.scatter(clf.support_vectors_[:,0], clf.support_vectors_[:,1],
s=80, facecolors='none')
pl.scatter(X[:,0], X[:,1], c=Y) pl.scatter(X[:,0], X[:,1], c=Y)
pl.scatter(clf.support_vectors_[:,0], clf.support_vectors_[:,1], c='white')
pl.axis('tight') pl.axis('tight')
pl.show() pl.show()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment