Skip to content

Commit d786052

Browse files
committed
Pushing the docs to dev/ for branch: main, commit 6169cc9b383c7dc15d9039767ed28eb6fd944f06
1 parent 3320985 commit d786052

File tree

736 files changed

+2265
-2265
lines changed

Some content is hidden

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

736 files changed

+2265
-2265
lines changed
Binary file not shown.

dev/_downloads/4b8d8f0d50e5aa937ac9571a35eadc28/plot_kmeans_stability_low_dim_dense.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
The first plot shows the best inertia reached for each combination
1212
of the model (``KMeans`` or ``MiniBatchKMeans``), and the init method
13-
(``init="random"`` or ``init="kmeans++"``) for increasing values of the
13+
(``init="random"`` or ``init="k-means++"``) for increasing values of the
1414
``n_init`` parameter that controls the number of initializations.
1515
1616
The second plot demonstrates one single run of the ``MiniBatchKMeans``

dev/_downloads/5a87b25ba023ee709595b8d02049f021/plot_kmeans_digits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def bench_k_means(kmeans, name, data, labels):
114114
#
115115
# We will compare three approaches:
116116
#
117-
# * an initialization using `kmeans++`. This method is stochastic and we will
117+
# * an initialization using `k-means++`. This method is stochastic and we will
118118
# run the initialization 4 times;
119119
# * a random initialization. This method is stochastic as well and we will run
120120
# the initialization 4 times;

dev/_downloads/6bf322ce1724c13e6e0f8f719ebd253c/plot_kmeans_digits.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"cell_type": "markdown",
5959
"metadata": {},
6060
"source": [
61-
"## Run the benchmark\n\nWe will compare three approaches:\n\n* an initialization using `kmeans++`. This method is stochastic and we will\n run the initialization 4 times;\n* a random initialization. This method is stochastic as well and we will run\n the initialization 4 times;\n* an initialization based on a :class:`~sklearn.decomposition.PCA`\n projection. Indeed, we will use the components of the\n :class:`~sklearn.decomposition.PCA` to initialize KMeans. This method is\n deterministic and a single initialization suffice.\n\n"
61+
"## Run the benchmark\n\nWe will compare three approaches:\n\n* an initialization using `k-means++`. This method is stochastic and we will\n run the initialization 4 times;\n* a random initialization. This method is stochastic as well and we will run\n the initialization 4 times;\n* an initialization based on a :class:`~sklearn.decomposition.PCA`\n projection. Indeed, we will use the components of the\n :class:`~sklearn.decomposition.PCA` to initialize KMeans. This method is\n deterministic and a single initialization suffice.\n\n"
6262
]
6363
},
6464
{
Binary file not shown.

dev/_downloads/77b640d8771f7ecdeb2dbc948ebce90a/plot_kmeans_plusplus.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-
"from sklearn.cluster import kmeans_plusplus\nfrom sklearn.datasets import make_blobs\nimport matplotlib.pyplot as plt\n\n# Generate sample data\nn_samples = 4000\nn_components = 4\n\nX, y_true = make_blobs(\n n_samples=n_samples, centers=n_components, cluster_std=0.60, random_state=0\n)\nX = X[:, ::-1]\n\n# Calculate seeds from kmeans++\ncenters_init, indices = kmeans_plusplus(X, n_clusters=4, random_state=0)\n\n# Plot init seeds along side sample data\nplt.figure(1)\ncolors = [\"#4EACC5\", \"#FF9C34\", \"#4E9A06\", \"m\"]\n\nfor k, col in enumerate(colors):\n cluster_data = y_true == k\n plt.scatter(X[cluster_data, 0], X[cluster_data, 1], c=col, marker=\".\", s=10)\n\nplt.scatter(centers_init[:, 0], centers_init[:, 1], c=\"b\", s=50)\nplt.title(\"K-Means++ Initialization\")\nplt.xticks([])\nplt.yticks([])\nplt.show()"
29+
"from sklearn.cluster import kmeans_plusplus\nfrom sklearn.datasets import make_blobs\nimport matplotlib.pyplot as plt\n\n# Generate sample data\nn_samples = 4000\nn_components = 4\n\nX, y_true = make_blobs(\n n_samples=n_samples, centers=n_components, cluster_std=0.60, random_state=0\n)\nX = X[:, ::-1]\n\n# Calculate seeds from k-means++\ncenters_init, indices = kmeans_plusplus(X, n_clusters=4, random_state=0)\n\n# Plot init seeds along side sample data\nplt.figure(1)\ncolors = [\"#4EACC5\", \"#FF9C34\", \"#4E9A06\", \"m\"]\n\nfor k, col in enumerate(colors):\n cluster_data = y_true == k\n plt.scatter(X[cluster_data, 0], X[cluster_data, 1], c=col, marker=\".\", s=10)\n\nplt.scatter(centers_init[:, 0], centers_init[:, 1], c=\"b\", s=50)\nplt.title(\"K-Means++ Initialization\")\nplt.xticks([])\nplt.yticks([])\nplt.show()"
3030
]
3131
}
3232
],

dev/_downloads/7e9cf82b8b60275dd7851470d151af5f/plot_kmeans_stability_low_dim_dense.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Empirical evaluation of the impact of k-means initialization\n\nEvaluate the ability of k-means initializations strategies to make\nthe algorithm convergence robust, as measured by the relative standard\ndeviation of the inertia of the clustering (i.e. the sum of squared\ndistances to the nearest cluster center).\n\nThe first plot shows the best inertia reached for each combination\nof the model (``KMeans`` or ``MiniBatchKMeans``), and the init method\n(``init=\"random\"`` or ``init=\"kmeans++\"``) for increasing values of the\n``n_init`` parameter that controls the number of initializations.\n\nThe second plot demonstrates one single run of the ``MiniBatchKMeans``\nestimator using a ``init=\"random\"`` and ``n_init=1``. This run leads to\na bad convergence (local optimum), with estimated centers stuck\nbetween ground truth clusters.\n\nThe dataset used for evaluation is a 2D grid of isotropic Gaussian\nclusters widely spaced.\n"
18+
"\n# Empirical evaluation of the impact of k-means initialization\n\nEvaluate the ability of k-means initializations strategies to make\nthe algorithm convergence robust, as measured by the relative standard\ndeviation of the inertia of the clustering (i.e. the sum of squared\ndistances to the nearest cluster center).\n\nThe first plot shows the best inertia reached for each combination\nof the model (``KMeans`` or ``MiniBatchKMeans``), and the init method\n(``init=\"random\"`` or ``init=\"k-means++\"``) for increasing values of the\n``n_init`` parameter that controls the number of initializations.\n\nThe second plot demonstrates one single run of the ``MiniBatchKMeans``\nestimator using a ``init=\"random\"`` and ``n_init=1``. This run leads to\na bad convergence (local optimum), with estimated centers stuck\nbetween ground truth clusters.\n\nThe dataset used for evaluation is a 2D grid of isotropic Gaussian\nclusters widely spaced.\n"
1919
]
2020
},
2121
{

dev/_downloads/fa03fd57e0f1a2cd66f3693283f7a6b3/plot_kmeans_plusplus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424
X = X[:, ::-1]
2525

26-
# Calculate seeds from kmeans++
26+
# Calculate seeds from k-means++
2727
centers_init, indices = kmeans_plusplus(X, n_clusters=4, random_state=0)
2828

2929
# Plot init seeds along side sample data

dev/_downloads/scikit-learn-docs.zip

2.25 KB
Binary file not shown.
-415 Bytes
227 Bytes
27 Bytes
13 Bytes
67 Bytes
13 Bytes
-114 Bytes
171 Bytes
57 Bytes
201 Bytes
-826 Bytes
1.05 KB
-408 Bytes
172 Bytes
36 Bytes
-161 Bytes
179 Bytes
16 Bytes
76 Bytes
-47 Bytes
99 Bytes
1 Byte
295 Bytes
-70 Bytes
-163 Bytes
-164 Bytes
36 Bytes
-31 Bytes
10 Bytes

dev/_sources/auto_examples/applications/plot_cyclical_feature_engineering.rst.txt

Lines changed: 1 addition & 1 deletion

dev/_sources/auto_examples/applications/plot_digits_denoising.rst.txt

Lines changed: 1 addition & 1 deletion

dev/_sources/auto_examples/applications/plot_face_recognition.rst.txt

Lines changed: 5 additions & 5 deletions

dev/_sources/auto_examples/applications/plot_model_complexity_influence.rst.txt

Lines changed: 15 additions & 15 deletions

0 commit comments

Comments
 (0)