Self-adaptive clustering optimization method based on density information entropy

By constructing a TFA model and optimizing the K-means algorithm with density information entropy, the problems of lack of dynamic evaluation and unstable clustering in customer segmentation were solved, achieving accurate and stable customer segmentation and improved business guidance.

CN122022906APending Publication Date: 2026-05-12ZUNYI NORMAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZUNYI NORMAL COLLEGE
Filing Date
2026-01-21
Publication Date
2026-05-12

Smart Images

  • Figure CN122022906A_ABST
    Figure CN122022906A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of customer management and data analysis, in particular to a density information entropy-based adaptive clustering optimization method, which comprises the following steps of: acquiring and preprocessing original transaction data of a customer; constructing a TFA customer subdivision model, calculating three types of indexes of customer development space, purchase frequency and average purchase amount, performing standardization, performing weighting through an analytic hierarchy process to form a weighted feature vector, and constructing a data set; based on a density information entropy optimization K-means algorithm, adaptively determining an optimal cutoff distance, selecting an initial cluster center according to a density and distance criterion, and iteratively completing clustering; and determining an optimal cluster center number and outputting customer grouping and value interpretation results by adopting contour coefficient and Clinski-Harabasz index evaluation. According to the method, the static value and the dynamic potential of the customer can be scientifically described, the clustering stability and accuracy are improved, the business interpretation of a subdivision result is high, accurate marketing and resource optimization configuration of an enterprise can be supported, and the method is adaptive to the customer subdivision requirements of multiple industries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of customer relationship management and data analysis technology, specifically to an adaptive clustering optimization method based on density information entropy. Background Technology

[0002] Customer segmentation is a core component of customer relationship management (CRM). Its core objective is to divide customers into subgroups with different values, behaviors, or needs based on multi-dimensional customer characteristics, providing precise support for enterprise decision-making. Currently, the RFM model and its derivatives, based on Recency, Frequency, and Monetary spending, are classic frameworks in the field of customer segmentation. However, traditional RFM models have significant limitations: First, they only provide a static description based on historical transaction behavior, failing to quantify and assess customers' future lifetime value and development potential, and making it difficult to distinguish between different types of customers such as "historically high-value customers who have not recently made purchases" and "recently low-value customers." Second, they typically do not weight the indicators, meaning they do not consider the differentiated contributions of each indicator across different industries and scenarios, resulting in insufficient business guidance for the segmentation results.

[0003] In addition, in the application of clustering algorithms, the K-means algorithm is widely used for customer segmentation due to its simple principle and high computational efficiency. However, the algorithm has the following drawbacks: the clustering results are heavily dependent on the randomly selected initial cluster centers, which can easily lead to unstable results, slow convergence speed, and getting stuck in local optima. In the existing improvement schemes, using multiple random initializations to obtain the optimal solution will significantly increase the amount of computation. On the other hand, the method of selecting the initial centers based on the data distribution density requires preset sensitive parameters such as the cutoff distance. Small changes in the parameters can have a significant impact on the results, and there is a lack of an adaptive parameter determination mechanism.

[0004] In summary, existing customer segmentation technologies lack effective characterization of customer development potential and scientific weighting of various indicators in model construction. In terms of algorithm implementation, current clustering stability is poor and parameter adaptation is insufficient. As a result, the accuracy, stability, and business interpretability of the segmentation results cannot meet the needs of refined enterprise operations, and a systematic solution is urgently needed. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention aims to provide an adaptive clustering optimization method based on density information entropy. It constructs a TFA model based on customer development potential (Trend), purchase frequency (Frequency), and average purchase amount (Average) to compensate for the deficiencies of the traditional RFM model. It also combines density information entropy with the K-means algorithm to solve the clustering stability problem, achieving accurate and stable customer segmentation.

[0006] The basic solution provided by this invention is an adaptive clustering optimization method based on density information entropy, comprising the following steps: S1: Collect the customer's original transaction data, preprocess the customer's original transaction data, and obtain the customer transaction data; S2: Calculate the customer development potential for each customer based on the aforementioned customer transaction data. Purchase frequency Average purchase amount The three types of indicators are standardized, and weights are assigned using the analytic hierarchy process to form weighted feature vectors. A customer dataset is constructed based on the weighted feature vectors of all customers, with each weighted feature vector corresponding to a sample point. S3: Optimize the K-means clustering algorithm based on density information entropy to perform clustering analysis on the customer dataset and obtain the clustering results; S3 includes the following sub-steps: S31: Calculate the local density for each sample point The calculation formula is:

[0007] in, It is the total number of sample points in the customer dataset. Sample points and The Euclidean distance between them It is the cutoff distance, an indicator function. satisfy: hour ,otherwise ; S32: Calculate the local density probability The calculation formula is:

[0008] Calculate information entropy The calculation formula is:

[0009] Information entropy is obtained through gradient descent. Minimum cutoff distance As the optimal cutoff distance; S33: Cut-off distance The optimal cutoff distance is selected, and the local density of all samples is calculated. S34: Local density Sort the samples in descending order, select the sample point with the highest density as the first cluster center, then calculate the minimum distance between all sample points and the selected cluster center, select the sample point with the largest minimum distance value as the next cluster center, and repeat this process until the preset K cluster centers are selected. S34: Perform standard K-means iterations until the cluster centers no longer change or the maximum number of iterations is reached, complete the clustering of all sample points, and obtain the clustering results; S4: The clustering results with different preset K values ​​are evaluated using internal evaluation metrics to determine the optimal number of cluster centers; S5: Based on the clustering results corresponding to the optimal number of cluster centers, the customers are grouped and the customer grouping and value interpretation results are output.

[0010] Furthermore, the preprocessing described in S1 includes deleting records containing missing values ​​and using the quartile method for outlier filtering.

[0011] Furthermore, the customer development space described in S2 The calculation formula is:

[0012] in, This indicates the time of the customer's last purchase. This indicates the preset observation point time. This indicates the average time interval between the customer's historical purchases; purchase frequency. The total number of purchases made by this customer within a preset first time period; average purchase amount. This represents the ratio of a customer's total spending to the total number of transactions within a pre-defined second time period.

[0013] Furthermore, the standardization process described in S2 uses Z-score standardization, and the standardized value... The calculation formula is:

[0014] in, Represents the original indicator value. It corresponds to the mean of the original indicators. It is the standard deviation of the corresponding indicator; the original indicator value. Including customer development opportunities Purchase frequency Average purchase amount After standardization by Z-score, the customer development space is obtained. Purchase frequency and average purchase amount .

[0015] Furthermore, the process of assigning weights using the analytic hierarchy process (AHP) in S2 includes constructing a judgment matrix, normalizing the weight vector, and performing a consistency check, ultimately resulting in the weights for the three categories of indicators. , , ,satisfy Weighted eigenvectors Characterized as: [ .

[0016] Furthermore, the internal evaluation metrics described in S4 include the silhouette coefficient and the Calinski-Harabasz index; the silhouette coefficient... The calculation formula is:

[0017] in, Sample points The average distance to other sample points within the same cluster. It is a sample The minimum average distance to all sample points in any other cluster; the Calinski-Harabasz exponent is calculated as follows:

[0018] in, For the sample size, The preset number of cluster centers, and These are the traces of the inter-cluster discrete matrix and the intra-cluster discrete matrix, respectively.

[0019] The silhouette coefficient measures the tightness of each sample with its own cluster and its separation from other clusters. The value ranges from -1 to 1. The closer it is to 1, the better, indicating that the sample is reasonably assigned to the cluster. The higher the Calinski-Harabasz index, the greater the inter-cluster variance and the smaller the intra-cluster variance, and the better the clustering effect.

[0020] The principle behind the technical solution of this invention lies in: introducing customer development space. The indicator quantifies customer return willingness and development potential by comparing the ratio of "the difference between the last purchase time and the observation point time" to "the historical average purchase interval," and is related to purchase frequency. (Activity level), average purchase amount (Value contribution) together constitute a three-dimensional feature system, comprehensively depicting the dynamic growth and static value of customers; By eliminating the differences in indicator dimensions through Z-score standardization, and then constructing a judgment matrix using the analytic hierarchy process (AHP), the indicator weights are obtained through normalization and consistency checks (ensuring scientific and reasonable weight allocation). This allows the weighted feature vector to accurately reflect the differentiated contributions of each indicator in different industries and scenarios. To address the core shortcomings of the K-means algorithm, density information entropy is introduced to achieve dual optimization of the initial centers: first, the density around the sample points is statistically analyzed using the local density calculation formula; then, the local density is transformed into a probability distribution and information entropy is calculated. The magnitude of information entropy directly reflects the disorder of the cluster structure. The cutoff distance with the minimum information entropy is found using the gradient descent method as the optimal value, achieving adaptive determination of the cutoff distance and avoiding the influence of subjective parameter settings. In selecting the initial cluster centers, the sample points with the highest density are first selected (ensuring that the centers are located in data-dense areas and are representative). Then, the subsequent cluster centers are selected iteratively using the principle of "maximizing minimum distance" (ensuring that the centers are dispersed and avoiding cluster overlap), thus solving the problem of unstable results caused by random initial centers from the source. Finally, the clustering is completed through standard K-means iteration, and the silhouette coefficient (measuring intra-cluster compactness and inter-cluster separation) and the Calinski-Harabasz index (measuring variance ratio) are used for evaluation to ensure the scientific validity of the optimal number of cluster centers. Finally, the optimal clustering and the value interpretation for each cluster are determined.

[0021] The beneficial effects of this invention are: by introducing customer development space Indicators, combined with purchase frequency and average purchase amount The TFA three-dimensional feature system is constructed, which not only retains the static assessment of historical transaction value, but also supplements the dynamic prediction of future development potential. It effectively distinguishes different types of customers such as "historically high value and low potential" and "low value and high potential", and solves the shortcomings of the static description of the traditional RFM model. At the same time, it scientifically empowers the data through the analytic hierarchy process, adapts to the differentiated contribution of each indicator in different industries and scenarios, and improves the business guidance of the segmented results. The optimal cutoff distance is adaptively determined by density information entropy to avoid result fluctuations caused by parameter sensitivity; the first cluster center is determined by "maximum density", and the remaining cluster centers are selected sequentially by the principle of "maximizing minimum distance" from the sample points to the selected cluster centers, which solves the problem of random initial centers in traditional K-means, making the clustering results more stable and the convergence speed faster; the comprehensive application of dual evaluation indicators ensures the scientific nature of the optimal number of cluster centers, and the clustering accuracy is significantly better than traditional algorithms. It can be quickly migrated to customer segmentation scenarios in different industries such as retail, e-commerce, and finance. It can be adapted simply by adjusting parameters such as observation point time and statistical time period according to industry characteristics. Moreover, the customer segmentation results are deeply bound to business scenarios, and the core characteristics of various customers are clearly defined. The output value interpretation results can directly guide enterprises to carry out differentiated marketing (such as cultivating high-potential customers and maintaining high-value customers) and optimize resource allocation (such as allocating resources to core customers), significantly improving the level of precision and return on investment in customer relationship management. Attached Figure Description

[0022] Figure 1 This is a flowchart of an embodiment of an adaptive clustering optimization method based on density information entropy according to the present invention. Detailed Implementation

[0023] The following detailed description illustrates the specific implementation method: The basic implementation examples are as follows: Figure 1 As shown: The basic solution provided by this invention is an adaptive clustering optimization method based on density information entropy, comprising the following steps: S1: Collect the customer's original transaction data, preprocess the customer's original transaction data, and obtain the customer transaction data; S2: Calculate the customer development potential for each customer based on the aforementioned customer transaction data. Purchase frequency Average purchase amount The three types of indicators are standardized, and weights are assigned using the analytic hierarchy process to form weighted feature vectors. A customer dataset is constructed based on the weighted feature vectors of all customers, with each weighted feature vector corresponding to a sample point. S3: Optimize the K-means clustering algorithm based on density information entropy to perform clustering analysis on the customer dataset and obtain the clustering results; S3 includes the following sub-steps: S31: Calculate the local density for each sample point The calculation formula is:

[0024] in, It is the total number of sample points in the customer dataset. Sample points and The Euclidean distance between them It is the cutoff distance, an indicator function. satisfy: hour ,otherwise ; S32: Calculate the local density probability The calculation formula is:

[0025] Calculate information entropy The calculation formula is:

[0026] Information entropy is obtained through gradient descent. Minimum cutoff distance As the optimal cutoff distance; S33: Cut-off distance The optimal cutoff distance is selected, and the local density of all samples is calculated. S34: Local density Sort the samples in descending order, select the sample point with the highest density as the first cluster center, then calculate the minimum distance between all sample points and the selected cluster center, select the sample point with the largest minimum distance value as the next cluster center, and repeat this process until the preset K cluster centers are selected. S34: Perform standard K-means iterations until the cluster centers no longer change or the maximum number of iterations is reached, complete the clustering of all sample points, and obtain the clustering results; S4: The clustering results with different preset K values ​​are evaluated using internal evaluation metrics to determine the optimal number of cluster centers; S5: Based on the clustering results corresponding to the optimal number of cluster centers, the customers are grouped and the customer grouping and value interpretation results are output.

[0027] Furthermore, the preprocessing described in S1 includes deleting records containing missing values ​​and using the quartile method for outlier filtering.

[0028] In this embodiment, the original customer transaction data comes from the OnlineRetail II dataset in the UCI Machine Learning Repository. This dataset records the sales records of an online sales company for one year, totaling approximately 540,000 records. The core fields include order number, customer number, product description, order amount, and order generation date. Preprocessing includes: using the `isnull()` function from Python's Pandas library to iterate through all records, identifying records with missing values ​​(such as missing customer IDs or missing order amounts), and directly deleting these invalid records; for the order amount field, the quartile method is used to calculate the first quartile, the third quartile, and the interquartile range, thereby setting an outlier threshold and filtering out abnormal records that exceed this threshold range (such as bulk purchase orders and return records with negative amounts), ultimately obtaining the customer transaction data.

[0029] Furthermore, the customer development space described in S2 The calculation formula is:

[0030] in, This indicates the time of the customer's last purchase. This indicates the preset observation point time. This indicates the average time interval between the customer's historical purchases; purchase frequency. The total number of purchases made by this customer within a preset first time period; average purchase amount. This represents the ratio of a customer's total spending to the total number of transactions within a pre-defined second time period.

[0031] To ensure customer growth potential Purchase frequency Average purchase amount The data content of the three types of indicators should be as independent as possible, and the preset first time period and the second time period should avoid complete overlap. In this embodiment, the first preset time period is the first 270 days, the second preset time period is the last 270 days, and the observation point time is selected as the 180th day.

[0032] Furthermore, the standardization process described in S2 uses Z-score standardization, and the standardized value... The calculation formula is:

[0033] in, Represents the original indicator value. It corresponds to the mean of the original indicators. It is the standard deviation of the corresponding indicator; the original indicator value. Including customer development opportunities Purchase frequency Average purchase amount After standardization by Z-score, the customer development space is obtained. Purchase frequency and average purchase amount .

[0034] Furthermore, the process of assigning weights using the analytic hierarchy process (AHP) in S2 includes constructing a judgment matrix, normalizing the weight vector, and performing a consistency check, ultimately resulting in the weights for the three categories of indicators. , , ,satisfy Weighted eigenvectors Characterized as: [ .

[0035] In this embodiment, based on the assessment of experts in the field of customer relationship management, a judgment matrix is ​​constructed using the importance scale of row indicators relative to column indicators (1-9 scale method), with the three rows representing customer development potential. Purchase frequency Average purchase amount The three columns represent customer development opportunities. Purchase frequency Average purchase amount The elements in the matrix represent the "importance of row indicators to column indicators." The judgment matrix is ​​as follows:

[0036] The weights of the three types of indicators are obtained through engineering approximation. , , The values ​​are 0.26, 0.11, and 0.63 respectively; the consistency ratio (CR) is less than 1, satisfying the consistency requirement, so the weighted feature vector is: [ .

[0037] Then in S3, the local density and cutoff distance for each sample point are calculated. Initialize to 0, and use gradient descent to obtain the optimal cutoff distance value that minimizes the information entropy H; set the cutoff distance... Set the optimal cutoff distance value and recalculate the local density of all sample points; the preset cluster center number K ranges from [2, 10]. Taking K = 6 as an example, after sorting the local densities in descending order, select the sample point with the highest density as the first cluster center; calculate the minimum distance between all sample points and this cluster center, and select the sample point with the largest distance as the second cluster center; repeat this process until 6 initial cluster centers are selected; standard K-means iteration: set the maximum number of iterations to 100, set the cluster center change threshold to 1e-6, execute the process of distance calculation, sample allocation, and center update, iterate until the cluster center change is less than the cluster center change threshold 1e. 6. Or, by reaching the maximum number of iterations (100), the clustering result when K=6 is obtained.

[0038] Furthermore, the internal evaluation metrics described in S4 include the silhouette coefficient and the Calinski-Harabasz index; the silhouette coefficient... The calculation formula is:

[0039] in, Sample points The average distance to other sample points within the same cluster. It is a sample The minimum average distance to all sample points in any other cluster; the Calinski-Harabasz exponent is calculated as follows:

[0040] in, For the sample size, The preset number of cluster centers, and These are the traces of the inter-cluster discrete matrix and the intra-cluster discrete matrix, respectively.

[0041] The silhouette coefficient measures the tightness of each sample with its own cluster and its separation from other clusters. Its value ranges from -1 to 1, with a value closer to 1 being better, indicating that the sample is reasonably assigned to a cluster. A higher Calinski-Harabasz index means greater inter-cluster variance and smaller intra-cluster variance, resulting in better clustering performance. In this embodiment, the silhouette coefficient and Calinski-Harabasz index are calculated for all clustering results with K ranging from 2 to 10. The results show that when K is 6, both the silhouette coefficient and Calinski-Harabasz index are maximized, indicating the optimal clustering performance. Therefore, the optimal number of cluster centers is determined to be 6.

[0042] Based on the clustering results corresponding to the optimal cluster center number K of 6, and combined with the weighted feature vector distribution of sample points in each cluster, customers are divided into six categories. The core characteristics and value interpretations of each category are as follows: 1. Low-value growth type (7.28%): Key characteristics include high willingness to return to the store, high purchase frequency, and low average order value. These customers are highly active but their contribution per customer is limited. Business application suggestions include pushing cross-selling products, bundled packages, and discount coupons to increase the average order value. 2. High-value retention customers (22.56%): Key characteristics include low willingness to return to the store, low purchase frequency, and medium average order value. These customers are stable existing customers. Business application suggestions include providing exclusive membership benefits, birthday gifts, and regular care services to prevent customer churn. 3. Diamond type (0.19%): Key characteristics include low willingness to return to the store, low purchase frequency, and extremely high average order value. This type of customer is a core high-net-worth customer. Business application suggestions include providing private customer service, customized services, and priority purchase rights for limited-edition products to ensure customer loyalty. 4. High-value growth customers (0.14%): Key characteristics include high willingness to return to the store, extremely high purchase frequency, and low average order value. These customers are highly loyal and have high potential. Business application suggestions include providing a fast upgrade channel for membership levels, doubling points, and value-added services to tap into their consumption potential. 5. Low-value and fragile type (accounting for 68.75%): The core characteristics include return visit intention, purchase frequency, and average order value all below average. This type of customer accounts for the largest proportion and has low value contribution. Business application suggestions are to use low-cost email marketing, platform push and other methods to maintain brand exposure and avoid excessive resource investment. 6. High-value development type (accounting for 1.08%): The core characteristics include low willingness to return to the store, low purchase frequency, and high average order value. These customers have high spending power but insufficient purchase frequency. Business application suggestions include pushing new customer activation packages and cumulative purchase frequency rewards to increase purchase frequency.

[0043] This embodiment achieves precise customer segmentation based on the OnlineRetail II dataset in the UCI Machine Learning Repository. By designing non-overlapping time periods, the independence of the three core indicators is ensured. The gradient descent method is used to optimize the cutoff distance, which enhances the adaptive capability of the clustering algorithm. The modified analytic hierarchy process (AHP) weighting makes the feature vectors more aligned with business logic. The stability and accuracy of the clustering results are superior to the traditional K-means algorithm, and the segmentation results have clear business guidance significance, which can directly support enterprises in carrying out refined customer relationship management.

[0044] The above are merely embodiments of the present invention. Commonly known structures and characteristics are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are aware of all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. An adaptive clustering optimization method based on density information entropy, characterized in that, Includes the following steps: S1: Collect the customer's original transaction data, preprocess the customer's original transaction data, and obtain the customer transaction data; S2: Calculate the customer development potential for each customer based on the aforementioned customer transaction data. Purchase frequency Average purchase amount The three types of indicators are standardized, and weights are assigned using the analytic hierarchy process to form weighted feature vectors. A customer dataset is constructed based on the weighted feature vectors of all customers, with each weighted feature vector corresponding to a sample point. S3: Optimize the K-means clustering algorithm based on density information entropy to perform clustering analysis on the customer dataset and obtain the clustering results; S3 includes the following sub-steps: S31: Calculate the local density for each sample point The calculation formula is: in, It is the total number of sample points in the customer dataset. Sample points and The Euclidean distance between them It is the cutoff distance, an indicator function. satisfy: hour ,otherwise ; S32: Calculate the local density probability The calculation formula is: Calculate information entropy The calculation formula is: Information entropy is obtained through gradient descent. Minimum cutoff distance As the optimal cutoff distance; S33: Cut-off distance The optimal cutoff distance is selected, and the local density of all samples is calculated. S34: Local density Sort the samples in descending order, select the sample point with the highest density as the first cluster center, then calculate the minimum distance between all sample points and the selected cluster center, select the sample point with the largest minimum distance value as the next cluster center, and repeat the process until the preset K cluster centers are selected. S34: Perform standard K-means iterations until the cluster centers no longer change or the maximum number of iterations is reached, complete the clustering of all sample points, and obtain the clustering results; S4: The clustering results with different preset K values ​​are evaluated using internal evaluation metrics to determine the optimal number of cluster centers; S5: Based on the clustering results corresponding to the optimal number of cluster centers, the customers are grouped and the customer grouping and value interpretation results are output.

2. The adaptive clustering optimization method based on density information entropy according to claim 1, characterized in that, The preprocessing described in S1 includes deleting records containing missing values ​​and using the quartile method for outlier filtering.

3. The adaptive clustering optimization method based on density information entropy according to claim 2, characterized in that, Customer development opportunities as described in S2 The calculation formula is: in, This indicates the time of the customer's last purchase. This indicates the preset observation point time. This indicates the average time interval between the customer's historical purchases; purchase frequency. The total number of purchases made by this customer within a preset first time period; average purchase amount. This represents the ratio of a customer's total spending to the total number of transactions within a pre-defined second time period.

4. The adaptive clustering optimization method based on density information entropy according to claim 3, characterized in that, The standardization process described in S2 uses Z-score standardization, and the standardized value is... The calculation formula is: in, Represents the original indicator value. It corresponds to the mean of the original indicators. It is the standard deviation of the corresponding indicator; the original indicator value. Including customer development opportunities Purchase frequency Average purchase amount After standardization by Z-score, the customer development space is obtained. Purchase frequency and average purchase amount .

5. The adaptive clustering optimization method based on density information entropy according to claim 4, characterized in that, The process of assigning weights using the analytic hierarchy process (AHP) in S2 includes constructing a judgment matrix, normalizing the weight vector, and performing a consistency check. The final weights for the three categories of indicators are as follows: , , ,satisfy ; Weighted eigenvectors Characterized as: [ .

6. The adaptive clustering optimization method based on density information entropy according to claim 5, characterized in that, The internal evaluation metrics described in S4 include the silhouette coefficient and the Calinski-Harabasz index; the silhouette coefficient... The calculation formula is: in, Sample points The average distance to other sample points within the same cluster. It is a sample The minimum average distance to all sample points in any other cluster; the Calinski-Harabasz exponent is calculated as follows: in, For the sample size, The preset number of cluster centers, and These are the traces of the inter-cluster discrete matrix and the intra-cluster discrete matrix, respectively.