Skip to content

Commit

Permalink
Cosmetic changes in plot_weighted_samples.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Pedregosa committed Nov 29, 2010
1 parent cd8c6b0 commit cb50708
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/svm/plot_weighted_samples.py
Expand Up @@ -24,11 +24,8 @@
clf = svm.SVC()
clf.fit(X, Y, sample_weight=sample_weight)

# get the separating hyperplane
# plot the decision function
xx, yy = np.meshgrid(np.linspace(-4, 5, 500), np.linspace(-4, 5, 500))


# plot the line, the points, and the nearest vectors to the plane
Z = clf.decision_function(np.c_[xx.ravel(), yy.ravel()])
Z = Z.reshape(xx.shape)

Expand All @@ -37,6 +34,6 @@
pl.contourf(xx, yy, Z, alpha=0.75)
pl.scatter(X[:,0], X[:,1], c=Y, s=sample_weight, alpha=0.9)

pl.axis('tight')
pl.axis('off')
pl.show()

0 comments on commit cb50708

Please sign in to comment.