Читать книгу Artificial Intelligence and Quantum Computing for Advanced Wireless Networks - Savo G. Glisic - Страница 27
Example 2.4
ОглавлениеWe will take the same department as before that wants to segment its customers. For simplicity, let us say the department wants to use only the technological level (tl) and background mismatch (bm) to make the segmentation. Background mismatch is defined as the difference between the content of the potential course and the technical expertise of the customer. They collected the customer data and used a scatter plot to visualize it (see Figure 2.11):
Now, the department can offer a rather focused, high‐level course to cluster C4 since the customer employees have high‐level general technical knowledge with expertise that is close to the content of the course. On the other hand, for cluster C1, the department should offer a course on the broader subject with fewer details.
Figure 2.11 Example of clustering.
Figure 2.12 k‐Means algorithm.
In k‐means, each cluster is associated with a centroid. The main objective of the k‐means algorithm is to minimize the sum of distances between the points and their respective cluster centroid.
As an example, in Figure 2.12 we have eight points, and we want to apply k‐means to create clusters for these points. Here is how we can do it:
1 Choose the number of clusters k.
2 Select k random points from the data as centroids.
3 Assign all the points to the closest cluster centroid.
4 Recompute the centroids of newly formed clusters.
5 Repeat steps 3 and 4.
There are essentially three stopping criteria that can be adopted to stop the k‐means algorithm:
1 Centroids of newly formed clusters do not change.
2 Points remain in the same cluster.
3 The maximum number of iterations is reached.
Meaning three means (k = 3) clustering on 2D dataset using [3] is shown in Figure 2.13.