Skip to content

Commit d03651e

Browse files
committed
Pushing the docs to dev/ for branch: main, commit 98df647ab1656bb778b0d4484a3c0972f2934d93
1 parent 1d3c559 commit d03651e

File tree

1,213 files changed

+4407
-4386
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,213 files changed

+4407
-4386
lines changed
Binary file not shown.

dev/_downloads/26998096b90db15754e891c733ae032c/plot_iris_dataset.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-
"# Code source: Ga\u00ebl Varoquaux\n# Modified for documentation by Jaques Grobler\n# License: BSD 3 clause\n\nimport matplotlib.pyplot as plt\nfrom sklearn import datasets\nfrom sklearn.decomposition import PCA\n\n# import some data to play with\niris = datasets.load_iris()\nX = iris.data[:, :2] # we only take the first two features.\ny = iris.target\n\nx_min, x_max = X[:, 0].min() - 0.5, X[:, 0].max() + 0.5\ny_min, y_max = X[:, 1].min() - 0.5, X[:, 1].max() + 0.5\n\nplt.figure(2, figsize=(8, 6))\nplt.clf()\n\n# Plot the training points\nplt.scatter(X[:, 0], X[:, 1], c=y, cmap=plt.cm.Set1, edgecolor=\"k\")\nplt.xlabel(\"Sepal length\")\nplt.ylabel(\"Sepal width\")\n\nplt.xlim(x_min, x_max)\nplt.ylim(y_min, y_max)\nplt.xticks(())\nplt.yticks(())\n\n# To getter a better understanding of interaction of the dimensions\n# plot the first three PCA dimensions\nfig = plt.figure(1, figsize=(8, 6))\nax = fig.add_subplot(111, projection=\"3d\", elev=-150, azim=110)\n\nX_reduced = PCA(n_components=3).fit_transform(iris.data)\nax.scatter(\n X_reduced[:, 0],\n X_reduced[:, 1],\n X_reduced[:, 2],\n c=y,\n cmap=plt.cm.Set1,\n edgecolor=\"k\",\n s=40,\n)\n\nax.set_title(\"First three PCA directions\")\nax.set_xlabel(\"1st eigenvector\")\nax.w_xaxis.set_ticklabels([])\nax.set_ylabel(\"2nd eigenvector\")\nax.w_yaxis.set_ticklabels([])\nax.set_zlabel(\"3rd eigenvector\")\nax.w_zaxis.set_ticklabels([])\n\nplt.show()"
29+
"# Code source: Ga\u00ebl Varoquaux\n# Modified for documentation by Jaques Grobler\n# License: BSD 3 clause\n\nimport matplotlib.pyplot as plt\n\n# unused but required import for doing 3d projections with matplotlib < 3.2\nimport mpl_toolkits.mplot3d # noqa: F401\n\nfrom sklearn import datasets\nfrom sklearn.decomposition import PCA\n\n# import some data to play with\niris = datasets.load_iris()\nX = iris.data[:, :2] # we only take the first two features.\ny = iris.target\n\nx_min, x_max = X[:, 0].min() - 0.5, X[:, 0].max() + 0.5\ny_min, y_max = X[:, 1].min() - 0.5, X[:, 1].max() + 0.5\n\nplt.figure(2, figsize=(8, 6))\nplt.clf()\n\n# Plot the training points\nplt.scatter(X[:, 0], X[:, 1], c=y, cmap=plt.cm.Set1, edgecolor=\"k\")\nplt.xlabel(\"Sepal length\")\nplt.ylabel(\"Sepal width\")\n\nplt.xlim(x_min, x_max)\nplt.ylim(y_min, y_max)\nplt.xticks(())\nplt.yticks(())\n\n# To getter a better understanding of interaction of the dimensions\n# plot the first three PCA dimensions\nfig = plt.figure(1, figsize=(8, 6))\nax = fig.add_subplot(111, projection=\"3d\", elev=-150, azim=110)\n\nX_reduced = PCA(n_components=3).fit_transform(iris.data)\nax.scatter(\n X_reduced[:, 0],\n X_reduced[:, 1],\n X_reduced[:, 2],\n c=y,\n cmap=plt.cm.Set1,\n edgecolor=\"k\",\n s=40,\n)\n\nax.set_title(\"First three PCA directions\")\nax.set_xlabel(\"1st eigenvector\")\nax.w_xaxis.set_ticklabels([])\nax.set_ylabel(\"2nd eigenvector\")\nax.w_yaxis.set_ticklabels([])\nax.set_zlabel(\"3rd eigenvector\")\nax.w_zaxis.set_ticklabels([])\n\nplt.show()"
3030
]
3131
}
3232
],

dev/_downloads/5b08a262d5845e4674288edb801adf93/plot_iris_dataset.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
# License: BSD 3 clause
2222

2323
import matplotlib.pyplot as plt
24+
25+
# unused but required import for doing 3d projections with matplotlib < 3.2
26+
import mpl_toolkits.mplot3d # noqa: F401
27+
2428
from sklearn import datasets
2529
from sklearn.decomposition import PCA
2630

Binary file not shown.

dev/_downloads/c8db473878b6afea8e75e36dc828f109/plot_compare_methods.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"outputs": [],
4646
"source": [
47-
"from numpy.random import RandomState\nimport matplotlib.pyplot as plt\nfrom matplotlib import ticker\n\nfrom sklearn import manifold, datasets\n\nrng = RandomState(0)\n\nn_samples = 1500\nS_points, S_color = datasets.make_s_curve(n_samples, random_state=rng)"
47+
"from numpy.random import RandomState\nimport matplotlib.pyplot as plt\nfrom matplotlib import ticker\n\n# unused but required import for doing 3d projections with matplotlib < 3.2\nimport mpl_toolkits.mplot3d # noqa: F401\n\nfrom sklearn import manifold, datasets\n\nrng = RandomState(0)\n\nn_samples = 1500\nS_points, S_color = datasets.make_s_curve(n_samples, random_state=rng)"
4848
]
4949
},
5050
{

dev/_downloads/cda53b33015268619bc212d32b7000b9/plot_compare_methods.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
import matplotlib.pyplot as plt
3333
from matplotlib import ticker
3434

35+
# unused but required import for doing 3d projections with matplotlib < 3.2
36+
import mpl_toolkits.mplot3d # noqa: F401
37+
3538
from sklearn import manifold, datasets
3639

3740
rng = RandomState(0)

dev/_downloads/scikit-learn-docs.zip

-1.26 KB
Binary file not shown.
-27 Bytes
-107 Bytes
39 Bytes

0 commit comments

Comments
 (0)