Finding groups of multiple variables
The basic concepts of the K-means algorithm to calculate group segments are as follows:
- Centroid: This is the average value of each segment.
- The optimal number of segments: The K-means algorithm computes the optimal number of groups, calculating the minimal standard deviation or the distance of the members of the group from its centroid.
We'll check them out in depth in the following sections.
Calculating centroids and the optimal number of segments for one variable
The first case is the numbers in Figure 4.5, in which we have to find the optimal number of segments and the members of each of them:
The case data in the chart in Figure 4.5 suggests that we have two possible groups, but we need the K-means statistical process to get the optimal number of groups before running the algorithm to...