Skip to content

Commit e710466

Browse files
committed
Pushing the docs to dev/ for branch: master, commit b03caaa4f8f6089b1a4b5bba43920b1506f23664
1 parent b645455 commit e710466

File tree

1,101 files changed

+3256
-3254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,101 files changed

+3256
-3254
lines changed
16 Bytes
Binary file not shown.
16 Bytes
Binary file not shown.

dev/_downloads/plot_separating_hyperplane.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"outputs": [],
2828
"source": [
29-
"print(__doc__)\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn import svm\nfrom sklearn.datasets import make_blobs\n\n\n# we create 40 separable points\nX, y = make_blobs(n_samples=40, centers=2, random_state=6)\n\n# fit the model, don't regularize for illustration purposes\nclf = svm.SVC(kernel='linear', C=1000)\nclf.fit(X, y)\n\nplt.scatter(X[:, 0], X[:, 1], c=y, s=30, cmap=plt.cm.Paired)\n\n# plot the decision function\nax = plt.gca()\nxlim = ax.get_xlim()\nylim = ax.get_ylim()\n\n# create grid to evaluate model\nxx = np.linspace(xlim[0], xlim[1], 30)\nyy = np.linspace(ylim[0], ylim[1], 30)\nYY, XX = np.meshgrid(yy, xx)\nxy = np.vstack([XX.ravel(), YY.ravel()]).T\nZ = clf.decision_function(xy).reshape(XX.shape)\n\n# plot decision boundary and margins\nax.contour(XX, YY, Z, colors='k', levels=[-1, 0, 1], alpha=0.5,\n linestyles=['--', '-', '--'])\n# plot support vectors\nax.scatter(clf.support_vectors_[:, 0], clf.support_vectors_[:, 1], s=100,\n linewidth=1, facecolors='none')\nplt.show()"
29+
"print(__doc__)\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn import svm\nfrom sklearn.datasets import make_blobs\n\n\n# we create 40 separable points\nX, y = make_blobs(n_samples=40, centers=2, random_state=6)\n\n# fit the model, don't regularize for illustration purposes\nclf = svm.SVC(kernel='linear', C=1000)\nclf.fit(X, y)\n\nplt.scatter(X[:, 0], X[:, 1], c=y, s=30, cmap=plt.cm.Paired)\n\n# plot the decision function\nax = plt.gca()\nxlim = ax.get_xlim()\nylim = ax.get_ylim()\n\n# create grid to evaluate model\nxx = np.linspace(xlim[0], xlim[1], 30)\nyy = np.linspace(ylim[0], ylim[1], 30)\nYY, XX = np.meshgrid(yy, xx)\nxy = np.vstack([XX.ravel(), YY.ravel()]).T\nZ = clf.decision_function(xy).reshape(XX.shape)\n\n# plot decision boundary and margins\nax.contour(XX, YY, Z, colors='k', levels=[-1, 0, 1], alpha=0.5,\n linestyles=['--', '-', '--'])\n# plot support vectors\nax.scatter(clf.support_vectors_[:, 0], clf.support_vectors_[:, 1], s=100,\n linewidth=1, facecolors='none', edgecolors='k')\nplt.show()"
3030
]
3131
}
3232
],

dev/_downloads/plot_separating_hyperplane.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
linestyles=['--', '-', '--'])
4242
# plot support vectors
4343
ax.scatter(clf.support_vectors_[:, 0], clf.support_vectors_[:, 1], s=100,
44-
linewidth=1, facecolors='none')
44+
linewidth=1, facecolors='none', edgecolors='k')
4545
plt.show()

dev/_downloads/scikit-learn-docs.pdf

26.9 KB
Binary file not shown.

dev/_images/iris.png

0 Bytes

0 commit comments

Comments
 (0)