Balanced subspace division method based on proportional entropy

By defining the membership matrix and equilibrium vector, combined with ADMM optimization, the shortcomings of the equilibrium subspace division algorithm in terms of time complexity and equilibrium, the equilibrium distribution of clustering results is achieved, and the equilibrium of the K-means algorithm is improved.

CN119249181APending Publication Date: 2025-01-03CHONGQING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411199776.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing balanced subspace division algorithms have shortcomings in terms of time complexity and balance. The absolute balance algorithm has high time complexity and poor relative balance division effect.

Method used

A equilibrium subspace division method based on proportional entropy is proposed. By defining membership matrix and equilibrium vector, combined with alternating direction multipliers (ADMM) optimization, a clustering model is constructed to achieve the equilibrium of clustering results.

Benefits of technology

The equilibrium of clustering results is significantly improved within the O(n2) time complexity, the equilibrium of the K-means algorithm is improved, and the equilibrium distribution of clustering results is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249181A_ABST
    Figure CN119249181A_ABST
Patent Text Reader

Abstract

The invention discloses an equilibrium subspace division method based on proportional entropy, and relates to the technical field of machine learning. The method at least comprises the following steps that S1, a quantity membership matrix and a balance vector based on clustering labels are defined, an n * k membership matrix F is constructed, n represents the number of data points, k represents the number of clusters, the matrix ensures that each data point only belongs to one cluster, meanwhile, a balance vector P is defined, and the concentration degree of the data points in each cluster is quantified; s2, defining a proportional entropy, defining the proportional entropy based on the balance vector P, and when the proportional entropy reaches a minimum value, indicating that a clustering result is balanced among various categories; and S3, constructing a square loss item by adopting Euclidean distance to measure the distance between the sample and the clustering center. According to the invention, through the steps of defining the membership matrix and the balance vector, defining the proportional entropy, constructing the clustering model, solving by using the ADMM algorithm and evaluating the balance index, the balance of each category in the clustering result is realized, so that the balance of the K-means algorithm is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine learning, and in particular to a balanced subspace partitioning method based on proportional entropy. Background Art

[0002] Balanced subspace partitioning plays an important role in load balancing, data retrieval and other fields. To solve this problem, the general approach is to use a balanced clustering algorithm to control the size of clustering by introducing size constraints so that the number of samples in different clusters is balanced. Typical balanced clustering algorithms include Balanced K-Means for Clustering (BKM), Constrained K-means (CKM) and Entropy Regularization k-Means (ERKM) which introduces a new measure of distance between clusters in subspace clustering.

[0003] The balanced clustering method is divided into absolute balanced partitioning and relative balanced partitioning. Its disadvantages are as follows:

[0004] 1) The time complexity of absolute balance algorithms is usually high. For example, the time complexity of the balanced K-means clustering (BKM) algorithm can reach O(n 3 ), some are even O(n 3.5 ).

[0005] 2) The time complexity of relatively balanced partitioning is low, but the balancing effect is poor. For example, the balance of constrained K-means clustering (CKM) and entropy regularized k-Means (ERKM) algorithms within the k-means algorithm framework still has room for improvement.

[0006] In order to solve the problems of high time complexity and insufficient balance, the present invention combines the clustering model with proportional entropy and proposes the algorithm BE-KMEANS (Balanced-Entropy K-means), which can be used in O(n 2 ) time to effectively improve the balance of the division.

[0007] Therefore, a new solution to the above problems needs to be proposed. Summary of the invention

[0008] The purpose of the present invention is to provide a balanced subspace partitioning method based on proportional entropy to solve the technical problems raised in the background technology.

[0009] To achieve the above object, the present invention provides the following technical solution: a balanced subspace partitioning method based on proportional entropy, comprising at least the following steps:

[0010] S1: Define the membership matrix and balance vector based on cluster labels, and construct an n×k membership matrix F, where n represents the number of data points and k represents the number of clusters. This matrix ensures that each data point belongs to only one cluster. At the same time, define the balance vector P to quantify the concentration of each cluster sample point.

[0011] S2: Definition of proportional entropy. Based on the equilibrium vector P, proportional entropy is defined. When the proportional entropy reaches the minimum value, it indicates that the clustering results are balanced among various categories.

[0012] S3: Use Euclidean distance to construct a square loss term to measure the distance between the sample and the cluster center;

[0013] S4: Construct a clustering model, combine the membership matrix F, proportional entropy and square loss term, construct a clustering model based on the proportional entropy balanced subspace partitioning algorithm, and adjust the model through hyperparameters to adapt to the characteristics of different data sets;

[0014] S5: Solving the clustering model using the alternating direction multiplier method (ADMM) by iteratively optimizing the membership matrix F and the balance vector P;

[0015] S6: Perform balance index evaluation and evaluate the clustering results through the balance index NE, where NE equals 1, indicating that the clustering results are completely balanced, and NE equals 0, indicating that the clustering results are completely unbalanced.

[0016] Furthermore, the S1 at least comprises the following steps:

[0017] The corresponding design formula (1) is as follows:

[0018]

[0019] The membership matrix is: According to the clustering labels T = [C0, C1, ..., C (k-1) ] can be converted into an n×k membership matrix F, where n is the number of data points and k is the number of clusters. The appropriate k value needs to be determined based on the specific problem and data characteristics. Each row of the matrix corresponds to a data point, and each column represents a cluster. im ∈{0,1} n×k is a 0-1 membership matrix, and each element F in the degree matrix F im It can only take 0 or 1 and the sum of the elements in each row is 1, which ensures that each data point belongs to only one cluster;

[0020] The equilibrium vector is: the equilibrium vector element P m Defined as the membership ratio of the m-th cluster, this ratio coefficient quantifies the concentration of data points in the m-th cluster.

[0021] Furthermore, the S2 at least includes the following steps:

[0022] The corresponding design formula (2) is as follows:

[0023]

[0024] Among them, H B (P) is the proportional entropy, which is used to measure the balance of the distribution of cluster instances in the clustering results; p is the balance vector, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics.

[0025] When entropy H B When (P) reaches its minimum value, it indicates that the elements in the equilibrium vector tend to be equal, thus reflecting that the clustering results have reached a balance among the various categories;

[0026] On the contrary, when H B A larger value of (P) means that the distribution of clustering results among different categories is unbalanced, that is, the data points of some categories are more concentrated, while those of other categories are relatively sparse.

[0027] The method for partitioning a balanced subspace based on proportional entropy according to claim 1 is characterized in that: the S3 design corresponds to equation (3) as follows:

[0028] ||x i -G m || 2 #(3) where x i is the i-th sample point in the data set, G m is the mth cluster center.

[0029] Furthermore, the S4 at least includes the following steps:

[0030] The design corresponding formula (4) is as follows:

[0031]

[0032] Where F = {F im}∈R n×k is a 0-1 membership matrix, F im =1 means x i Belongs to the mth cluster, F im =0 means x i does not belong to the mth cluster. G represents the cluster center moment. P is the balance vector, which consists of a series of elements P m Composition, P mis the ratio of the number of instances belonging to the mth cluster to the total number of instances. λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored. k is the number of clusters. The appropriate k value needs to be determined based on the specific problem and data characteristics. i is the i-th sample point in the data set, G m is the mth cluster center point, and n is the total number of sample points in the data set.

[0033] Further, the solution using the alternating direction multiplier method in S5 at least includes the following steps:

[0034] It is necessary to solve three variables and optimize them in an iterative way;

[0035] First, fix two of the parameters and solve for the other parameter, that is, fix F and P and solve for G. At this time, the objective function is transformed into formula (5):

[0036]

[0037] Where G represents the cluster center matrix, F = {F im}∈R n×k is a 0-1 membership matrix, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics. i is the i-th sample point in the data set, G m is the mth cluster center point, and n is the total number of sample points in the data set.

[0038] Taking the derivative of equation (5) and setting its derivative to zero, we get G m The final expression of is shown in formula (6):

[0039]

[0040] Where F = {F im}∈R n×k is a 0-1 membership matrix, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. x i is the i-th sample point of the data set, G m is the mth cluster center point, and n is the total number of sample points in the data set.

[0041] When solving the membership matrix F and the equilibrium distribution vector P, the alternating direction multiplier method is used to optimize these two parameters simultaneously. By introducing the Lagrange multiplier γ m (m=1,…k), and fix other variables at the same time, we get the augmented Lagrangian equation of the target equation (4), as shown in equation (7):

[0042]

[0043] Where F = {F im}∈R n×k is a 0-1 membership matrix, F im =1 means x i belongs to the mth cluster, and F im =0 means x i does not belong to the mth cluster. P is a balanced vector, consisting of a series of elements P m Composition, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. m is the mth Lagrange multiplier, λ is a hyperparameter, and by adjusting the value of λ, different equilibrium vector weight distributions can be explored. k is the number of clusters, and the appropriate k value needs to be determined based on the specific problem and data characteristics. i is the i-th sample point in the data set, G m is the mth cluster center point, n is the total number of sample points in the data set, and u1 is the penalty parameter.

[0044] The iterative update formula of the ADMM algorithm to optimize the equilibrium vector P is as follows (8):

[0045]

[0046] Where P (t+1) is the equilibrium vector of the t+1 iteration, L is the augmented Lagrangian equation, F (t) With γ (t)

[0047] are the 0-1 membership matrix and Lagrange multiplier of the t-th iteration respectively;

[0048] Formula (8) describes the fixed membership matrix P in the t+1th iteration. (t) and the Lagrange multiplier γ (t) The process of updating the equilibrium vector P by minimizing the objective function L under the condition of .

[0049] The specific expression is shown in formula (9):

[0050]

[0051] Where P m (t+1)It is the ratio of the number of instances belonging to the mth cluster in the t+1 iteration to the total number of instances. im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. γ m is the mth Lagrange multiplier, u1 is the penalty parameter. k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics. λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored.

[0052] To solve the vector P, we can use equation (9) to divide the vector P into k sub-problems, where the mth item is the following equation (10):

[0053]

[0054] Where P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. γ m is the mth Lagrange multiplier, u1 is the penalty parameter, and λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions are explored.

[0055] Taking the derivative of equation (10) and setting it to 0, we can solve P m As shown in formula (11):

[0056]

[0057] Where P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. γ m is the mth Lagrange multiplier, u1 is the penalty parameter, and λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions are explored.

[0058] Similarly, to solve F, the iterative update formula for optimizing the membership matrix F using the alternating direction multiplier method is as follows (12):

[0059]

[0060] Among them, F (t+1) is the 0-1 membership moment of the t+1 iteration, L is the augmented Lagrangian equation, P (t) With γ (t) are the equilibrium vector and Lagrange multiplier of the tth iteration respectively.

[0061] Equation (12) describes the equation in the t+1th iteration, and the equilibrium vector P is fixed. (t) and the Lagrange multiplier γ (t) In the case of , the membership matrix is ​​updated by minimizing the objective function L. The specific expression is shown in formula (13):

[0062]

[0063] Among them, F im (t+1) is the membership matrix element of t+1 iterations, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. x i is the i-th sample point in the data set, G m is the mth cluster center. m is the mth Lagrange multiplier, u1 is the penalty parameter. k is the number of clusters. The appropriate k value needs to be determined in combination with the specific problem and data characteristics. λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored. n is the total number of sample points in the data set.

[0064] in Substituting into equation (13) yields equation (14), as shown below:

[0065]

[0066] Among them, F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. x i is the i-th sample point in the data set, G m is the mth cluster center point. m The ratio of the number of instances belonging to the mth cluster to the total number of instances. mis the mth Lagrange multiplier, u1 is the penalty parameter. k is the number of clusters. The appropriate k value needs to be determined based on the specific problem and data characteristics. λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored. n is the total number of sample points in the data set;

[0067] When solving F, we adopt a row-by-row solution method, that is, we find the optimal allocation under the current state for each instance;

[0068] From formula (14), we can get F i. Solve equation (15):

[0069]

[0070] Among them, F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. m is the mth Lagrange multiplier, G m is the mth cluster center point, u1 is the penalty parameter. k is the number of clusters. The appropriate k value needs to be determined in combination with the specific problem and data characteristics. λ is a hyperparameter. By adjusting the value of λ, different balance vector weights can be explored. n is the total number of sample points in the data set;

[0071] Each instance is only allowed to be assigned to one cluster;

[0072] Therefore, when solving Fi., there will be k candidates, each of which represents the case where instance i belongs to the mth cluster;

[0073] Then substitute these k candidates into equation (15) respectively, and select the candidate with the smallest function value as the solution of Fi.

[0074] Then, this process is repeated until F no longer changes, and the complete membership matrix F can be obtained;

[0075] The updated Lagrange multiplier is shown in equation (16):

[0076]

[0077] Among them, β is a hyperparameter, γ m is the mth Lagrange multiplier, u1 is the penalty parameter, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. im is the membership matrix element, F im =1 means xi belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster.

[0078] Compared with the prior art, the present invention has the following beneficial effects:

[0079] The present invention achieves the balance of various categories in the clustering results by defining the membership matrix and the balance vector, defining the proportional entropy, building a clustering model, solving with the ADMM algorithm and evaluating the balance index, thereby improving the balance of the K-means algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0081] Figure 1 Schematic diagram of the BE-KMEANS algorithm flow of the present invention. DETAILED DESCRIPTION

[0082] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0083] A balanced subspace partitioning method based on proportional entropy at least comprises the following steps:

[0084] S1: Define the membership matrix and balance vector based on cluster labels, and construct an n×k membership matrix F, where n represents the number of data points and k represents the number of clusters. This matrix ensures that each data point belongs to only one cluster. At the same time, define the balance vector P to quantify the concentration of data points in each cluster.

[0085] S2: Definition of proportional entropy. Based on the equilibrium vector P, proportional entropy is defined. When the proportional entropy reaches the minimum value, it indicates that the clustering results are balanced among various categories.

[0086] S3: Use Euclidean distance to construct a square loss term to measure the distance between the sample and the cluster center;

[0087] S4: Construct a clustering model, combine the membership matrix F, proportional entropy and square loss term, construct a clustering model based on the proportional entropy balanced subspace partitioning algorithm, and adjust the model through hyperparameters to adapt to the characteristics of different data sets;

[0088] S5: Solving the clustering model using the alternating direction multiplier method (ADMM) by iteratively optimizing the membership matrix F and the balance vector P;

[0089] S6: Perform balance index evaluation and evaluate the clustering results through the balance index NE, where NE equals 1, indicating that the clustering results are completely balanced, and NE equals 0, indicating that the clustering results are completely unbalanced.

[0090] S1 includes at least the following steps:

[0091] The corresponding design formula (1) is as follows:

[0092]

[0093] The membership matrix is: According to the clustering labels T = [C0, C1, ..., C (k-1) ] can be converted into an n×k membership matrix F, where n is the number of data points and k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics. Each row of the matrix corresponds to a data point and each column represents a cluster. im ∈{0,1} n×k is a 0-1 membership matrix, and each element F in the degree matrix F im It can only take 0 or 1 and the sum of the elements in each row is 1, which ensures that each data point belongs to only one cluster;

[0094] The equilibrium vector is: the equilibrium vector element P m Defined as the membership ratio of the m-th cluster, this ratio coefficient quantifies the concentration of data points in the m-th cluster.

[0095] S2 includes at least the following steps:

[0096] The corresponding design formula (2) is as follows:

[0097]

[0098] Among them, H B (P) is the proportional entropy, which is used to measure the balance of the distribution of cluster instances in the clustering results. p is the balance vector, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics.

[0099] When the entropy H(p) reaches its minimum value, it indicates that the elements in the equilibrium vector tend to be equal, thus reflecting that the clustering results have reached a balance among the categories;

[0100] On the contrary, when the value of H(p) is large, it means that the distribution of clustering results among different categories is unbalanced, that is, the data points of some categories are more concentrated, while those of other categories are relatively sparse.

[0101] According to a balanced subspace partitioning method based on proportional entropy of claim 1, it is characterized in that: S3 is designed to correspond to equation (3) as follows:

[0102] ||x i -G m || 2 #(3)

[0103] where x i is the i-th sample point in the data set, G m is the mth cluster center.

[0104] S4 at least includes the following steps:

[0105] The design corresponding formula (4) is as follows:

[0106]

[0107] Where F = {F im}∈R n×k is a 0-1 membership matrix, F im =1 means x i Belongs to the mth cluster, F im =0 means x i does not belong to the mth cluster. G represents the cluster center moment. P is the balance vector, which consists of a series of elements P m Composition, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored. k is the number of clusters. The appropriate k value needs to be determined based on the specific problem and data characteristics. i is the i-th sample point in the data set, G m is the mth cluster center point, and n is the total number of sample points in the data set.

[0108] See also Figure 1 , the solution using the alternating direction multiplier method in S5 at least includes the following steps:

[0109] It is necessary to solve three variables and optimize them in an iterative way;

[0110] First, fix two of the parameters and solve for the other parameter, that is, fix F and P and solve for G. At this time, the objective function is transformed into formula (5):

[0111]

[0112] Where G represents the cluster center matrix, F = {F im}∈R n×k is a 0-1 membership matrix, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics. i is the i-th sample point in the data set, G m is the mth cluster center point, and n is the total number of sample points in the data set.

[0113] Taking the derivative of equation (5) and setting its derivative to zero, we get G m The final expression of is shown in formula (6):

[0114]

[0115] Where F = {F im}∈R n×k is a 0-1 membership matrix, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. x i is the i-th sample point of the data set, G m is the mth cluster center point, and n is the total number of sample points in the data set.

[0116] When solving the membership matrix F and the equilibrium distribution vector P, the alternating direction multiplier method is used to optimize these two parameters simultaneously. By introducing the Lagrange multiplier γ m (m=1,…k), and fix other variables at the same time, we get the augmented Lagrangian equation of the target equation (4), as shown in equation (7):

[0117]

[0118] Where F = {F im}∈R n×k is a 0-1 membership matrix, F im =1 means x i belongs to the mth cluster, and F im =0 means x i does not belong to the mth cluster. P is a balanced vector, consisting of a series of elements P m Composition, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. mis the mth Lagrange multiplier, λ is a hyperparameter, and by adjusting the value of λ, different equilibrium vector weight distributions can be explored. k is the number of clusters, and the appropriate k value needs to be determined based on the specific problem and data characteristics. i is the i-th sample point in the data set, G m is the mth cluster center point, n is the total number of sample points in the data set, and u1 is the penalty parameter.

[0119] The iterative update formula of the ADMM algorithm to optimize the equilibrium vector P is as follows (8):

[0120]

[0121] Where P (t+1) is the equilibrium vector of the t+1 iteration, L is the augmented Lagrangian equation, F (t) With γ (t) are the 0-1 membership matrix and Lagrange multiplier of the t-th iteration respectively;

[0122] Formula (8) describes the fixed membership matrix P in the t+1th iteration. (t) and the Lagrange multiplier γ (t) The process of updating the equilibrium vector P by minimizing the objective function L under the condition of .

[0123] The specific expression is shown in formula (9):

[0124]

[0125] Where P m (t+1) It is the ratio of the number of instances belonging to the mth cluster in the t+1 iteration to the total number of instances. im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. γ m is the mth Lagrange multiplier, u1 is the penalty parameter. k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics. λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored.

[0126] To solve the vector P, we can use equation (9) to divide the vector P into k sub-problems, where the mth item is the following equation (10):

[0127]

[0128] Where P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. imis the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. γ m is the mth Lagrange multiplier, u1 is the penalty parameter, and λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions are explored.

[0129] Taking the derivative of equation (10) and setting it to 0, we can solve P m As shown in formula (11):

[0130]

[0131] Where P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. γ m is the mth Lagrange multiplier, u1 is the penalty parameter, and λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions are explored.

[0132] Similarly, to solve F, the iterative update formula for optimizing the membership matrix F using the alternating direction multiplier method is as follows (12):

[0133]

[0134] Among them, F (t+1) is the 0-1 membership matrix of t+1 iterations, L is the augmented Lagrangian equation, P (t) With γ (t) are the equilibrium vector and Lagrange multiplier of the tth iteration respectively.

[0135] Equation (12) describes the equation in the t+1th iteration, and the equilibrium vector P is fixed. (t) and the Lagrange multiplier γ (t) In the case of , the membership matrix is ​​updated by minimizing the objective function L. The specific expression is shown in formula (13):

[0136]

[0137] Among them, F im (t+1) is the membership matrix element of t+1 iterations, F im =1 means x i belongs to the mth cluster, and F im=0 means x i Does not belong to the mth cluster. x i is the i-th sample point in the data set, G m is the mth cluster center. m is the mth Lagrange multiplier, u1 is the penalty parameter. k is the number of clusters. The appropriate k value needs to be determined in combination with the specific problem and data characteristics. λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored. n is the total number of sample points in the data set.

[0138] in Substituting into equation (13) yields equation (14), as shown below:

[0139]

[0140] Among them, F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. x i is the i-th sample point in the data set, G m is the mth cluster center point. m The ratio of the number of instances belonging to the mth cluster to the total number of instances. m is the mth Lagrange multiplier, u1 is the penalty parameter. k is the number of clusters. The appropriate k value needs to be determined based on the specific problem and data characteristics. λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored. n is the total number of sample points in the data set;

[0141] When solving F, we adopt a row-by-row solution method, that is, we find the optimal allocation under the current state for each instance;

[0142] From formula (14), we can get F i. Solve equation (15):

[0143]

[0144] Among them, F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster. m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. m is the mth Lagrange multiplier, G mis the mth cluster center point, u1 is the penalty parameter. k is the number of clusters. The appropriate k value needs to be determined in combination with the specific problem and data characteristics. λ is a hyperparameter. By adjusting the value of λ, different balance vector weights can be explored. n is the total number of sample points in the data set;

[0145] Each instance is only allowed to be assigned to one cluster;

[0146] Therefore, when solving Fi., there will be k candidates, each of which represents the case where instance i belongs to the mth cluster;

[0147] Then, these k candidates are substituted into formula (15) and the candidate with the smallest function value is selected as F i. The solution;

[0148] Then, this process is repeated until F no longer changes, and the complete membership matrix F can be obtained;

[0149] The updated Lagrange multiplier is shown in equation (16):

[0150]

[0151] Among them, β is a hyperparameter, γ m is the mth Lagrange multiplier, u1 is the penalty parameter, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances. im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster.

[0152] The specific processes of the BE-KMEANS algorithm and the ADMM algorithm are as follows:

[0153]

[0154]

[0155] λ in Algorithm 1 is set to (10N) 2 , N is the number of samples.

[0156]

[0157] γ in Algorithm 2 m The initial value of is 1, and the initial value of β is 1.1.

[0158] The relationship between the BE-KMEANS algorithm and the ADMM algorithm is as follows:

[0159] The relationship between the BE-KMEANS algorithm and the alternating direction multiplier method (ADMM) is reflected in the solution process. The BE-KMEANS algorithm uses the ADMM algorithm for optimization when solving the membership matrix and equilibrium vector. ADMM is an algorithm used to solve constrained optimization problems. It introduces Lagrange multipliers to transform the original problem into a minimization problem of the augmented Lagrangian function and solves it by iterative updating.

[0160] Specifically, it includes the following two aspects:

[0161] Block optimization: ADMM decomposes the global problem into multiple smaller, easier-to-solve local sub-problems, and obtains the solution to the global problem by coordinating the solutions to these sub-problems, thereby reducing the difficulty of optimization;

[0162] Iterative update: In the BE-KMEANS algorithm, the solution of the instance membership matrix and the equilibrium distribution vector is achieved through the iterative update step of ADMM, including updating the membership matrix, equilibrium vector, and Lagrange multipliers.

[0163] Based on the above embodiments, the following technical effects are proposed:

[0164] Balance indicators:

[0165]

[0166] When NE=1, it indicates that the clustering result is completely balanced, and NE=0 indicates that the clustering result is completely unbalanced.

[0167] As shown in Table 1.

[0168]

[0169] Table 1 Balance comparison

[0170] Iris, Digits and Wine are three public real datasets, while Balanced and Unbalanced are artificially synthesized datasets. Specifically, the Balanced dataset shows a uniform data distribution, and each category is balanced; on the contrary, the Unbalanced dataset shows a significant data aggregation phenomenon, and the data points are highly concentrated in certain areas. In this invention, we use a variety of classic clustering algorithms for comparative analysis, including K-means, fuzzy C-means (FCM) and K-means++.

[0171] As shown in Table 1, the BE-KMEANS algorithm effectively achieves a balanced distribution of categories in the clustering results by incorporating the concept of proportional entropy, thereby improving the balance of the K-means algorithm. The entire clustering process is an iterative process, which includes the following steps: updating the cluster center G, updating the Lagrange multiplier γ and the penalty parameter u1, solving the proportional entropy P, and updating the F matrix. The total time complexity of the algorithm is t×n×m×k (maximum number of iterations×data volume×data dimension×number of clusters). Since the number of clusters k and the number of iterations t are much smaller than the amount of data n, the time complexity of the BE-KMEANS algorithm can be simplified to O(n 2 ).

[0172] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A balanced subspace partitioning method based on proportional entropy, characterized by: At least the following steps are included: S1: Define the membership matrix and balance vector based on cluster labels, and construct an n×k membership matrix F, where n represents the number of data points and k represents the number of clusters. This matrix ensures that each data point belongs to only one cluster. At the same time, define the balance vector P to quantify the concentration of each cluster sample point. S2: Definition of proportional entropy. Based on the equilibrium vector P, proportional entropy is defined. When the proportional entropy reaches the minimum value, it indicates that the clustering results are balanced among various categories. S3: Use Euclidean distance to construct a square loss term to measure the distance between the sample point and the cluster center; S4: Construct a clustering model, combine the membership matrix F, proportional entropy and square loss term, construct a clustering model based on the proportional entropy balanced subspace partitioning algorithm, and adjust the model through hyperparameters to adapt to the characteristics of different data sets; S5: Solving the clustering model using the alternating direction multiplier method (ADMM) by iteratively optimizing the membership matrix F and the balance vector P; S6: Perform balance index evaluation and evaluate the clustering results through the balance index NE, where NE equals 1, indicating that the clustering results are completely balanced, and NE equals 0, indicating that the clustering results are completely unbalanced.

2. The method for partitioning a balanced subspace based on proportional entropy according to claim 1, characterized in that: The S1 at least comprises the following steps: The corresponding design formula (1) is as follows: The membership matrix is: According to the clustering labels T = [C0, C1, ..., C (k-1) ] can be converted into an n×k membership matrix F, where n is the number of data points and k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics. Each row of the matrix corresponds to a data point and each column represents a cluster. im ∈{0,1} n×k is a 0-1 membership matrix, and each element F in the degree matrix F im It can only take 0 or 1 and the sum of the elements in each row is 1, which ensures that each data point belongs to only one cluster; The balance Vector: Balance vector element P m Defined as the membership ratio of the m-th cluster, this ratio coefficient quantifies the concentration of data points in the m-th cluster.

3. The method for partitioning a balanced subspace based on proportional entropy according to claim 1, characterized in that: The S2 at least comprises the following steps: The corresponding design formula (2) is as follows: Among them, H B (P) is the proportional entropy, which is used to measure the balance of the distribution of cluster instances in the clustering results; P is the balance vector, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances; k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics; When entropy H B When (P) reaches its minimum value, it indicates that the elements in the equilibrium vector tend to be equal, thus reflecting that the clustering results have reached a balance among the various categories; On the contrary, when H B A larger value of (P) means that the distribution of clustering results among different categories is unbalanced, that is, the data points of some categories are more concentrated, while those of other categories are relatively sparse.

4. The method for partitioning a balanced subspace based on proportional entropy according to claim 1, characterized in that: The S3 design corresponds to formula (3) as follows: ||x i -G m || 2 #(3) where x i is the i-th sample point in the data set, G m is the mth cluster center.

5. The method for partitioning a balanced subspace based on proportional entropy according to claim 1, characterized in that: The S4 at least comprises the following steps: The design corresponding formula (4) is as follows: Where F = {F im }∈R n×k is a 0-1 membership matrix, F im =1 means x i Belongs to the mth cluster, F im =0 means x i does not belong to the mth cluster; G represents the cluster center moment; P is the balance vector, which consists of a series of elements P m Composition, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances; λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored; k is the number of clusters. The appropriate k value needs to be determined based on the specific problem and data characteristics; x i is the i-th sample point in the data set, G m is the mth cluster center point, and n is the total number of sample points in the data set.

6. The method for partitioning a balanced subspace based on proportional entropy according to claim 1, characterized in that: The solution using the alternating direction multiplier method in S5 at least includes the following steps: It is necessary to solve three variables and optimize them in an iterative way; First, fix two of the parameters and solve for the other parameter, that is, fix F and P and solve for G. At this time, the objective function is transformed into formula (5): Where G represents the cluster center matrix, F = {F im }∈R n×k is a 0-1 membership matrix, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster; k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics; x i is the i-th sample point in the data set, G m is the mth cluster center point, and n is the total number of sample points in the data set; Taking the derivative of equation (5) and setting its derivative to zero, we get G m The final expression of is shown in formula (6): Where F = {F im }∈R n×k is a 0-1 membership matrix, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster; x i is the i-th sample point of the data set, G m is the mth cluster center point, and n is the total number of sample points in the data set; When solving the membership matrix F and the equilibrium distribution vector P, the alternating direction multiplier method is used to optimize these two parameters simultaneously. By introducing the Lagrange multiplier γ m (m=1,…k), and fix other variables at the same time, we get the augmented Lagrangian equation of the target equation (4), as shown in equation (7): Where F = {F im }∈R n×k is a 0-1 membership matrix, F im =1 means x i belongs to the mth cluster, and F im =0 means x i does not belong to the mth cluster; P is a balanced vector, consisting of a series of elements P m Composition; P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances; m is the mth Lagrange multiplier, λ is a hyperparameter. By adjusting the value of λ, different equilibrium vector weight distributions can be explored. k is the number of clusters. The appropriate k value should be determined based on the specific problem and data characteristics. i is the i-th sample point in the data set, G m is the mth cluster center point, n is the total number of sample points in the data set, and u1 is the penalty parameter; The iterative update formula of the ADMM algorithm to optimize the equilibrium vector P is as follows (8): Where P (t+1) is the equilibrium vector of the t+1 iteration, L is the augmented Lagrangian equation, F (t) With γ (t) are the 0-1 membership matrix and Lagrange multiplier of the t-th iteration respectively; Formula (8) describes the fixed membership matrix P in the t+1th iteration. (t) and the Lagrange multiplier γ (t) In the case of , the process of updating the equilibrium vector P by minimizing the objective function L; The specific expression is shown in formula (9): Where P m (t+1) is the ratio of the number of instances belonging to the mth cluster in the t+1 iteration to the total number of instances; F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster; γ m is the mth Lagrange multiplier, u1 is the penalty parameter; k is the number of clusters, and the appropriate k value needs to be determined in combination with the specific problem and data characteristics; λ is a hyperparameter, and by adjusting the value of λ, different equilibrium vector weight distributions can be explored; To solve the vector P, we can use equation (9) to divide the vector P into k sub-problems, where the mth item is the following equation (10): Where P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances; F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster; γ m is the mth Lagrange multiplier, u1 is the penalty parameter; λ is a hyperparameter, and by adjusting the value of λ, different equilibrium vector weight distributions are explored; Taking the derivative of equation (10) and setting it to 0, we can solve P m As shown in formula (11): Where P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances; F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster; γ m is the mth Lagrange multiplier, u1 is the penalty parameter; λ is a hyperparameter, and by adjusting the value of λ, different equilibrium vector weight distributions are explored; Similarly, to solve F, the iterative update formula for optimizing the membership matrix F using the alternating direction multiplier method is as follows (12): where F (t+1) is the 0-1 membership matrix of t+1 iterations, L is the augmented Lagrangian equation, P (t) With γ (t) are the equilibrium vector and Lagrange multiplier of the tth iteration respectively; Equation (12) describes the equation in the t+1th iteration, and the equilibrium vector P is fixed. (t) and the Lagrange multiplier γ (t) In the case of , the membership matrix is ​​updated by minimizing the objective function L. The specific expression is shown in formula (13): where F im (t+1) is the membership matrix element of t+1 iterations, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster; x i is the i-th sample point in the data set, G m is the mth cluster center point; γ m is the mth Lagrange multiplier, u1 is the penalty parameter; k is the number of clusters, and the appropriate k value needs to be determined in combination with the specific problem and data characteristics; λ is a hyperparameter, and by adjusting the value of λ, different equilibrium vector weight distributions can be explored; n is the total number of sample points in the data set; in Substituting into equation (13) yields equation (14), as shown below: where F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster; x i is the i-th sample point in the data set, G m is the mth cluster center point; P m The ratio of the number of instances belonging to the mth cluster to the total number of instances; γ m is the mth Lagrange multiplier, u1 is the penalty parameter; k is the number of clusters, and the appropriate k value needs to be determined in combination with the specific problem and data characteristics; λ is a hyperparameter, and by adjusting the value of λ, different equilibrium vector weight distributions can be explored; n is the total number of sample points in the data set; When solving F, we adopt a row-by-row solution method, that is, we find the optimal allocation under the current state for each instance; From formula (14), we can get F i. Solve equation (15): where F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster; P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances; m is the mth Lagrange multiplier, G m is the mth cluster center point, u1 is the penalty parameter; k is the number of clusters. The appropriate k value needs to be determined in combination with the specific problem and data characteristics; λ is a hyperparameter. By adjusting the value of λ, different balance vector weights can be explored; n is the total number of sample points in the data set; Each instance is only allowed to be assigned to one cluster; Therefore, in solving F i. When , there will be k candidates, each candidate represents the case where instance i belongs to the mth cluster; Then, these k candidates are substituted into formula (15) and the candidate with the smallest function value is selected as F i. The solution; Then, this process is repeated until F no longer changes, and the complete membership matrix F can be obtained; The updated Lagrange multiplier is shown in equation (16): Among them, β is a hyperparameter, γ m is the mth Lagrange multiplier, u1 is the penalty parameter, P m is the ratio of the number of instances belonging to the mth cluster to the total number of instances; F im is the membership matrix element, F im =1 means x i belongs to the mth cluster, and F im =0 means x i Does not belong to the mth cluster.