Python machine learning | K-means Clustering using scikit-learn
Автор: EasyDataScience
Загружено: 2025-09-10
Просмотров: 67
Описание:
In a K-means clustering process, we
1. Randomly pick k centroids from the examples as initial cluster centers
2. Assign each example to the nearest centroid,
3. Move the centroids to the center of the examples that were assigned to it
4. Repeat steps 2 and 3 until the cluster assignments do not change or a user-defined tolerance or maximum number of iterations is reached.
Based on the within-cluster SSE, we can use a graphical tool, the so-called elbow method, to estimate the optimal number of clusters, k, for a given task. We can say that if k increases, the distortion will decrease. This is because the examples will be closer to the centroids they are assigned to. The idea behind the elbow method is to identify the value of k where the distortion begins to increase most rapidly, which will become clearer if we plot the distortion for different values of k.
Silhouette analysis can be used as a graphical tool to plot a measure of how tightly grouped the examples in the clusters are.
An ideal silhouette coefficient of 1 which means an example is dissimilar from other clusters, and similar to the other examples in its own cluster.
#python
#machinelearning
#kmeans
#clustering
#easydatascience2508
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: