diff --git a/examples/svm/plot_separating_hyperplane.py b/examples/svm/plot_separating_hyperplane.py index fafadb2d381d0..9fdbcc785ed2b 100644 --- a/examples/svm/plot_separating_hyperplane.py +++ b/examples/svm/plot_separating_hyperplane.py @@ -16,10 +16,10 @@ # we create 40 separable points -X, y = make_blobs(n_samples=40, centers=2, random_state=12, cluster_std=0.35) +X, y = make_blobs(n_samples=40, centers=2, random_state=6) -# fit the model -clf = svm.SVC(kernel='linear') +# fit the model, don't regularize for illustration purposes +clf = svm.SVC(kernel='linear', C=1000) clf.fit(X, y) plt.scatter(X[:, 0], X[:, 1], c=y, s=30, cmap=plt.cm.Paired) @@ -42,3 +42,4 @@ # plot support vectors ax.scatter(clf.support_vectors_[:, 0], clf.support_vectors_[:, 1], s=100, linewidth=1, facecolors='none') +plt.show()