Skip to content

Commit 6b4d58a

Browse files
committed
Pushing the docs to 0.21/ for branch: 0.21.X, commit ba5f14f20fe35d6e7ef566c32fda339540ecf5ad
1 parent b68194f commit 6b4d58a

File tree

1,218 files changed

+7446
-6049
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,218 files changed

+7446
-6049
lines changed

0.21/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 3e3885547e10875114115ac4ad5c2154
3+
config: fc4c2112c5244e30b781655af6b58f9e
44
tags: 645f666f9bcd5a90fca523b33c5a78b7
-39 Bytes
Binary file not shown.
-38 Bytes
Binary file not shown.

0.21/_downloads/plot_kernel_pca.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\n# Authors: Mathieu Blondel\n# Andreas Mueller\n# License: BSD 3 clause\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom sklearn.decomposition import PCA, KernelPCA\nfrom sklearn.datasets import make_circles\n\nnp.random.seed(0)\n\nX, y = make_circles(n_samples=400, factor=.3, noise=.05)\n\nkpca = KernelPCA(kernel=\"rbf\", fit_inverse_transform=True, gamma=10)\nX_kpca = kpca.fit_transform(X)\nX_back = kpca.inverse_transform(X_kpca)\npca = PCA()\nX_pca = pca.fit_transform(X)\n\n# Plot results\n\nplt.figure()\nplt.subplot(2, 2, 1, aspect='equal')\nplt.title(\"Original space\")\nreds = y == 0\nblues = y == 1\n\nplt.scatter(X[reds, 0], X[reds, 1], c=\"red\",\n s=20, edgecolor='k')\nplt.scatter(X[blues, 0], X[blues, 1], c=\"blue\",\n s=20, edgecolor='k')\nplt.xlabel(\"$x_1$\")\nplt.ylabel(\"$x_2$\")\n\nX1, X2 = np.meshgrid(np.linspace(-1.5, 1.5, 50), np.linspace(-1.5, 1.5, 50))\nX_grid = np.array([np.ravel(X1), np.ravel(X2)]).T\n# projection on the first principal component (in the phi space)\nZ_grid = kpca.transform(X_grid)[:, 0].reshape(X1.shape)\nplt.contour(X1, X2, Z_grid, colors='grey', linewidths=1, origin='lower')\n\nplt.subplot(2, 2, 2, aspect='equal')\nplt.scatter(X_pca[reds, 0], X_pca[reds, 1], c=\"red\",\n s=20, edgecolor='k')\nplt.scatter(X_pca[blues, 0], X_pca[blues, 1], c=\"blue\",\n s=20, edgecolor='k')\nplt.title(\"Projection by PCA\")\nplt.xlabel(\"1st principal component\")\nplt.ylabel(\"2nd component\")\n\nplt.subplot(2, 2, 3, aspect='equal')\nplt.scatter(X_kpca[reds, 0], X_kpca[reds, 1], c=\"red\",\n s=20, edgecolor='k')\nplt.scatter(X_kpca[blues, 0], X_kpca[blues, 1], c=\"blue\",\n s=20, edgecolor='k')\nplt.title(\"Projection by KPCA\")\nplt.xlabel(r\"1st principal component in space induced by $\\phi$\")\nplt.ylabel(\"2nd component\")\n\nplt.subplot(2, 2, 4, aspect='equal')\nplt.scatter(X_back[reds, 0], X_back[reds, 1], c=\"red\",\n s=20, edgecolor='k')\nplt.scatter(X_back[blues, 0], X_back[blues, 1], c=\"blue\",\n s=20, edgecolor='k')\nplt.title(\"Original space after inverse transform\")\nplt.xlabel(\"$x_1$\")\nplt.ylabel(\"$x_2$\")\n\nplt.subplots_adjust(0.02, 0.10, 0.98, 0.94, 0.04, 0.35)\n\nplt.show()"
29+
"print(__doc__)\n\n# Authors: Mathieu Blondel\n# Andreas Mueller\n# License: BSD 3 clause\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom sklearn.decomposition import PCA, KernelPCA\nfrom sklearn.datasets import make_circles\n\nnp.random.seed(0)\n\nX, y = make_circles(n_samples=400, factor=.3, noise=.05)\n\nkpca = KernelPCA(kernel=\"rbf\", fit_inverse_transform=True, gamma=10)\nX_kpca = kpca.fit_transform(X)\nX_back = kpca.inverse_transform(X_kpca)\npca = PCA()\nX_pca = pca.fit_transform(X)\n\n# Plot results\n\nplt.figure()\nplt.subplot(2, 2, 1, aspect='equal')\nplt.title(\"Original space\")\nreds = y == 0\nblues = y == 1\n\nplt.scatter(X[reds, 0], X[reds, 1], c=\"red\",\n s=20, edgecolor='k')\nplt.scatter(X[blues, 0], X[blues, 1], c=\"blue\",\n s=20, edgecolor='k')\nplt.xlabel(\"$x_1$\")\nplt.ylabel(\"$x_2$\")\n\nX1, X2 = np.meshgrid(np.linspace(-1.5, 1.5, 50), np.linspace(-1.5, 1.5, 50))\nX_grid = np.array([np.ravel(X1), np.ravel(X2)]).T\n# projection on the first principal component (in the phi space)\nZ_grid = kpca.transform(X_grid)[:, 0].reshape(X1.shape)\nplt.contour(X1, X2, Z_grid, colors='grey', linewidths=1, origin='lower')\n\nplt.subplot(2, 2, 2, aspect='equal')\nplt.scatter(X_pca[reds, 0], X_pca[reds, 1], c=\"red\",\n s=20, edgecolor='k')\nplt.scatter(X_pca[blues, 0], X_pca[blues, 1], c=\"blue\",\n s=20, edgecolor='k')\nplt.title(\"Projection by PCA\")\nplt.xlabel(\"1st principal component\")\nplt.ylabel(\"2nd component\")\n\nplt.subplot(2, 2, 3, aspect='equal')\nplt.scatter(X_kpca[reds, 0], X_kpca[reds, 1], c=\"red\",\n s=20, edgecolor='k')\nplt.scatter(X_kpca[blues, 0], X_kpca[blues, 1], c=\"blue\",\n s=20, edgecolor='k')\nplt.title(\"Projection by KPCA\")\nplt.xlabel(r\"1st principal component in space induced by $\\phi$\")\nplt.ylabel(\"2nd component\")\n\nplt.subplot(2, 2, 4, aspect='equal')\nplt.scatter(X_back[reds, 0], X_back[reds, 1], c=\"red\",\n s=20, edgecolor='k')\nplt.scatter(X_back[blues, 0], X_back[blues, 1], c=\"blue\",\n s=20, edgecolor='k')\nplt.title(\"Original space after inverse transform\")\nplt.xlabel(\"$x_1$\")\nplt.ylabel(\"$x_2$\")\n\nplt.tight_layout()\nplt.show()"
3030
]
3131
}
3232
],

0.21/_downloads/plot_kernel_pca.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,5 @@
7676
plt.xlabel("$x_1$")
7777
plt.ylabel("$x_2$")
7878

79-
plt.subplots_adjust(0.02, 0.10, 0.98, 0.94, 0.04, 0.35)
80-
79+
plt.tight_layout()
8180
plt.show()

0.21/_downloads/scikit-learn-docs.pdf

-2.14 KB
Binary file not shown.

0.21/_images/iris.png

0 Bytes

0 commit comments

Comments
 (0)