Clustering method based on multi-agent system
By building an information communication network and using a first-order consistency protocol to simulate information interaction between agents, and determining the optimal separating sets in combination with genetic algorithms, the problem of traditional clustering algorithms neglecting information interaction is solved, and efficient and accurate clustering effect is achieved.
Patent Information
- Application Number
- CN202411705531.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional clustering algorithms ignore information interactions between data points, resulting in poor clustering effects.
Using a clustering method based on multi-agent system, by constructing an information communication network, treating data points as agents, using Gaussian similarity function to calculate the information interaction intensity, using a first-order consistency protocol to simulate information interaction and state updates between agents, and using a genetic algorithm to determine the optimal cut set to achieve clustering.
It realizes efficient and accurate clustering of samples, enhances the algorithm's adaptability to different data sets, and improves clustering accuracy.
Smart Images

Figure CN119719812A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of data analysis, data mining, computer clustering algorithms, multi-agent systems, and more particularly to a clustering method based on a multi-agent system. Background Art
[0002] Clustering is the most widely studied and applied task in unsupervised learning. The core clustering algorithm is an unsupervised learning method used to group or cluster samples in a data set into subsets with similar characteristics. It is usually used in data mining, pattern recognition, image segmentation, recommendation systems and other fields.
[0003] Considering various application scenarios, existing clustering algorithms show great diversity in design. Among these algorithms, prototype-based clustering methods are particularly typical, and they show excellent performance in many scenarios. This type of method generally initializes the prototype first, and then solves the prototype through iterative updates. For example, the K-means clustering method is for the minimum square error, the mixed Gaussian clustering method is for the probabilistic model, and the spectral clustering method is for the graph model. In addition, density-based clustering methods and hierarchical clustering methods are also some typical algorithms, which are also useful to a certain extent. For example, the DBSCAN clustering method is suitable for densely distributed samples, while the birch clustering method is suitable for processing large-scale data sets. However, traditional clustering algorithms usually regard samples in the data set as isolated nodes, ignoring the information interaction between them.
[0004] Multi-agent system is a system composed of multiple interacting agents, which is often used in the field of distributed computing. For example, Nediqi et al. studied a distributed computing model for optimizing the convex objective function and corresponding to multiple agents. In the study of multi-agent systems, the consensus protocol is one of the basic problems that need to be solved in multi-agent coordination. The so-called consensus protocol refers to a set of rules or criteria in a multi-agent system that defines how agents communicate, collaborate and coordinate their actions, and enables a group of agents to reach a consensus on a joint state value. The design of the consensus protocol is crucial to solving a series of multi-agent problems such as group behavior, convergence, group movement, posture alignment and distributed estimation. At the same time, in the field of clustering, consistency is a core principle, which requires that the similarity of samples within the same cluster should be high, while the difference between samples in different clusters should be large. From this perspective, the design of the consensus protocol in the multi-agent system and the consistency principle in the clustering algorithm are actually solving the same problem. Summary of the invention
[0005] The purpose of the present invention is to provide a clustering method based on a multi-agent system to solve the problem that traditional data sample clustering methods ignore the information interaction between data points, so as to achieve efficient and accurate clustering of samples.
[0006] In order to achieve the above tasks, the present invention adopts the following technical solutions:
[0007] A clustering method based on a multi-agent system, comprising:
[0008] Obtain a data set to be clustered, treat the data set as a multi-agent system, and the samples in the data set as multi-agents, construct an information communication network corresponding to the multi-agent system, and convert the clustering task of the samples into a multi-agent collaborative grouping task; the information communication network is characterized by a set of agents, a set of information interaction links between agents, and a set of information interaction strengths between agents; wherein the samples correspond to the multi-agents one-to-one, and the sample features are used as the initial state information of the agents; and the information interaction strength between agents is calculated using a Gaussian similarity function;
[0009] The number of clusters for clustering the data set is set, the optimal cut set of the information communication network is determined using a genetic algorithm, and the information communication network is divided into a set of multi-agent subsystems using the optimal cut set, thereby obtaining a cluster set of the data set.
[0010] Furthermore, the information interaction intensity between agents is calculated using the Gaussian similarity function, which is expressed as:
[0011]
[0012] where w ij is the information interaction intensity between agent i and agent j, e is a natural constant, y i (t0) and y j (t0) are the initial state information of agent i and agent j respectively; δ is the preset bandwidth parameter of the Gaussian kernel function.
[0013] Further, the information communication network has three types, including a fully connected information communication network, an ε-neighbor information communication network, and a k-nearest neighbor information communication network;
[0014] For a fully connected information communication network, each node has an information interaction link with other nodes;
[0015] For the ε-neighboring information communication network, when the information interaction intensity between agent i and agent j is less than the threshold ε, there is an information interaction link between agent i and agent j; ε is in [min(W ε ),mean(W ε )], where min(W ε) represents the information interaction intensity set W between agents ε The minimum value, mean(W ε ) indicates W ε The mean of
[0016] For the k-neighbor information communication network, agent i only establishes information interaction links with its k nearest neighbor agents; the value of k is 30% to 50% of the sample size of the dataset.
[0017] Furthermore, the agents in the information communication network implement information interaction through a first-order consensus protocol;
[0018] Assume that there are n agents in a multi-agent system with an information communication network G, and the initial state information of agent i at time t0 is y i (t0), i = 1, ..., n, then the change in state information update at the next moment for agent i is defined as:
[0019]
[0020] Where N(i) represents the set of neighboring agents that have information interaction links with agent i in the information communication network; w ij represents the information interaction intensity between agent i and agent j; y i (t p ) represents agent i at t p Status information at all times; is the change in the state information update of agent i at the next moment; therefore, the state information of agent i at the next moment is updated to
[0021] Furthermore, the objective function of the genetic algorithm is expressed as follows:
[0022]
[0023] Where c represents the cut set, k represents the number of clusters; the cut set c divides the information communication network G into k non-intersecting sub-information communication networks {G i |i=1,2,...k}, and then divide the multi-agent system into k multi-agent subsystems {S i |i=1,2,...k}; G′ represents the multi-agent subsystem {S i |i=1,2,...k} information communication network; sub-information communication network G i The second smallest eigenvalue of the Laplace matrix is λ2(G i ), the maximum eigenvalue is λ n (G i); The second smallest eigenvalue of the Laplacian matrix of the information communication network G′ is λ2(G′), and the largest eigenvalue is λ n (G′).
[0024] Furthermore, the multi-agent subsystem {S i The information communication network between |i=1,2,...k} is constructed as follows:
[0025] The multi-agent subsystem S i Abstract as virtual node v i , if the multi-agent subsystem S i There exists an agent i′ and a multi-agent subsystem S j The agent j′ in the multi-agent system S has an information exchange link under the corresponding information communication network G, then the virtual node v i With virtual node v j There are also information exchange links in the information communication network G′; virtual node v i The state information of the multi-agent subsystem S i The information interaction intensity of the information interaction link is calculated as: Under the information communication network G, the multi-agent subsystem S i With multi-agent subsystem S j The average value of the information interaction strength of all information interaction links that exist between them.
[0026] Furthermore, the steps of the genetic algorithm are as follows:
[0027] Step 1, select the Gaussian similarity function to calculate the information interaction intensity matrix W between the agents;
[0028] Step 2: construct the information communication network G = {V, E, W} corresponding to the multi-agent system S, where V is the set of agents, that is, the set of nodes in the information communication network; E is the set of information interaction links between agents, that is, the set of edges in the information communication network;
[0029] Step 3, initialize the number of iterations g = 0, the population size N, the number of parents n1, and the maximum number of iterations g max ;
[0030] Step 4: Randomly generate N cut sets, denoted as: P g ={c g1 ,c g2 ,...,c gN}, where c gN represents the Nth cut set;
[0031] Step 5: Calculate the cut set P gThe objective function F(c) corresponding to each cut set in the , and the cut set with the maximum objective function value is recorded as c * , then the objective function value is F(c * );
[0032] Step 6: Update the optimal cut set c best , let c best =c * ;
[0033] Step 7, from P g Select the first n1 cut sets with higher objective function values and combine them as parent sets;
[0034] Step 8: Use the selection operator, crossover operator, and mutation operator in the genetic algorithm to generate a new cut set P. g+1 ;
[0035] Step 9: Calculate the cut set P g+1 The objective function F(c) corresponding to each cut set in the , and the cut set with the maximum objective function value is recorded as c′, and the objective function value at this time is F(c′);
[0036] Step 10, determine whether F(c′) and F(c * ), if F(c′)≥F(c * ), then let c * = c′, otherwise c is not updated * ;
[0037] Step 11, update the number of iterations g = g + 1;
[0038] Step 12: Repeat steps 6 to 11 until the optimal cut set c is obtained. best In continuous No changes occur during the round, or until g ≥ g max ;
[0039] Step 13, based on the optimal cut set c best Generate the optimal multi-agent subsystem set {S i |i=1,2,...k}, and generate the optimal cluster set {C i |i=1,2,...,k}.
[0040] A positioning device comprises a processor, a memory and a computer program stored in the memory; when the processor executes the computer program, the clustering method based on the multi-agent system is implemented.
[0041] A computer-readable storage medium stores a computer program; when the computer program is executed by a processor, the clustering method based on a multi-agent system is implemented.
[0042] A data partitioning device adopts the clustering method based on multi-agent system when performing data partitioning.
[0043] Compared with the prior art, the present invention has the following technical features:
[0044] The present invention regards cluster samples as intelligent agents with information interaction functions, builds an information communication network, uses a first-order consensus protocol to simulate information interaction and state update between intelligent agents, and optimizes the collaborative grouping of multi-agent systems to achieve the purpose of data sample clustering. On the basis of ensuring clustering accuracy, the present invention can enhance the adaptability of the algorithm to different data sets through a flexible information communication network construction method, and has a wider application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of constructing a fully connected interactive network in the present invention;
[0046] Figure 2 is a schematic diagram of constructing an ε-adjacent interaction network in the present invention;
[0047] Figure 3 It is a schematic diagram of constructing a k-nearest neighbor interaction network in the present invention;
[0048] Figure 4 It is a schematic diagram of the genetic algorithm framework based on multi-agent collaboration in the present invention. DETAILED DESCRIPTION
[0049] The present invention regards the samples in the data set as agents with information interaction functions, and achieves the purpose of sample clustering by optimizing the collaborative mode of the multi-agent system, that is, the characteristics of the samples are regarded as the state information of the agent, and the state information of some agents is updated by information communication with adjacent agents to make them consistent and then identified as the same cluster. In order to solve this problem, the present invention constructs a multi-agent information communication network based on Gaussian similarity, selects the first-order consensus protocol as the information interaction model, designs the corresponding improved genetic algorithm, and uses computational intelligence to optimize the collaborative grouping of the multi-agent system, thereby realizing sample clustering.
[0050] The present invention provides a clustering method based on a multi-agent system, comprising the following steps:
[0051] 1. Obtain the data set to be clustered, regard the data set as a multi-agent system, and the samples in the data set as multi-agents, build an information communication network corresponding to the multi-agent system, and convert the clustering task of the samples into a multi-agent collaborative grouping task; the information communication network is characterized by a set of agents, a set of information interaction links between agents, and a set of information interaction intensity between agents; wherein the samples correspond one-to-one to the multi-agents, and the sample features are used as the initial state information of the agents; the Gaussian similarity function is used to calculate the information interaction intensity between agents.
[0052] 1.1 Information Interaction Intensity between Agents
[0053] Since the existing clustering algorithms regard the samples in the data set as isolated nodes when clustering data in different fields such as gene expression data and market segmentation data, and ignore the information interaction between samples, the present invention assumes the samples in the data set to be intelligent agents, and the sample characteristics are used as the initial state information of the intelligent agents, and establishes information interaction between samples by constructing an information communication network between intelligent agents.
[0054] Before building the information communication network, the Gaussian similarity function is used to map the initial state information difference between agents to a non-negative similarity value, thereby obtaining the information interaction intensity between agents:
[0055]
[0056] where w ij is the information interaction intensity between agent i and agent j, e is a natural constant, y i (t0) and y j (t0) is the initial state information of agent i and agent j respectively; ||y i (t0)-y j (t0)|| 2 is the square of the Euclidean distance between the initial state information of agent i and agent j, which is used to characterize the state information difference between agents; δ is the bandwidth parameter preset by the Gaussian kernel function, which is used to control the rate at which the information interaction intensity changes with the state information difference.
[0057] 1.2 Selection of information and communication networks
[0058] In practical applications, different data set characteristics determine the type of information communication network to be used. Therefore, for different data sets and their internal information interaction intensity, the present invention provides three information communication network construction methods, namely, fully connected information communication network, ε-neighbor information communication network and k-nearest neighbor information communication network. When facing different data sets, different information communication networks can be flexibly selected based on their data distribution characteristics.
[0059] Assume that the data set has a total of n samples, and the corresponding sample features are x i , i=1,...,n, then we need to build an information communication network among n agents. The i-th sample point corresponds to agent i, and its sample feature x i As the initial state information y of agent i i (t0), that is, y i (t0) = x i ,i=1,...,n. Then, an information communication network G is constructed based on the information interaction intensity between agents, denoted as G{V,E,W}, where V is the set of agents, that is, the node set of the information communication network; E is the set of information interaction links between agents, that is, the edge set of the information communication network; W is the set of information interaction intensity between agents, that is, the edge weight set of the information communication network. The following are three methods for constructing information communication networks:
[0060] (1) Fully connected information communication network: In a fully connected information communication network, there is information interaction between any two agents. That is, the topological structure of the fully connected information communication network is a fully connected graph, such as Figure 1 Therefore, for the fully connected information communication network G f {V f ,E f ,W f}, where the node set V f ={i|i=1,2,...,n}, represents the set of agents, the edge set E f ={e ij |i,j=1,2,...,n,i≠j},e ij =1 indicates that there is an information interaction link between agent i and agent j; the information interaction strength set W f ={w ij i,j=1,2,...,n,i≠j}, indicating that the information interaction intensity between agent i and agent j is w ij .
[0061] (2) ε-neighborhood information communication network: In the ε-neighborhood information communication network, any agent i does not have information interaction links with other agents and can exchange information with them. Instead, it can only establish information interaction links with agents within a certain range around it to exchange information, such as Figure 2 Therefore, the present invention uses the information interaction intensity as the threshold for establishing the information interaction link between agents, that is, for agent i, if the information interaction intensity between it and agent j is less than the threshold ε, then an information interaction link is established between the two agents. ε {V ε ,E ε ,W ε}, where the node set V ε ={i|i=1,2,...,n}, represents the set of agents, the edge set E ε ={e ij i,j=1,2,...,n,i≠j}, where when the information interaction intensity between agent i and agent j is less than the threshold ε, e ij =1 indicates that there is an information exchange link between agent i and agent j, otherwise e ij = 0 means that there is no information interaction link between agent i and agent j. Information interaction strength set W ε ={w ij |i,j=1,2,...,n,i≠j}, which means the information interaction intensity between agent i and agent j is w ij In the actual modeling process, in order to ensure the topological connectivity of the information communication network, ε is generally in [min(W ε ),mean(W ε )], where min(W ε ) represents the minimum value of the information interaction intensity set, mean(W ε ) represents the mean value of information interaction intensity.
[0062] (3) k-nearest neighbor information communication network: Similarly, in a k-nearest neighbor information communication network, any agent i does not have information interaction links with all other agents and can exchange information. However, unlike the ε-nearest neighbor information communication network, any agent i can only establish information interaction links with its nearest k neighbor agents to exchange information, such as Figure 3 Therefore, for the k-neighboring information communication network G k {V k ,E k ,W k}, where the node set V k ={i|i=1,2,...,n}, represents the set of agents, the edge set E k ={e ij |i,j=1,2,...,n,i≠j}, where e ij =1 indicates that there is an information exchange link between agent i and agent j, otherwise e ij = 0 means that there is no information interaction link between agent i and agent j. Information interaction strength set W k ={w ij |i,j=1,2,...,n,i≠j}, which means the information interaction intensity between agent i and agent j is w ij In the actual modeling process, in order to ensure the topological connectivity of the information communication network, the value of k is generally 30% to 50% of its sample size.
[0063] In actual application, the three information communication networks have their own applicable scenarios:
[0064] When the sample size in the sample data set is less than 100, it is more appropriate to choose to build a fully connected information communication network to establish information interaction links between any samples to avoid missing dynamic interactions of key status information.
[0065] When the sample size in the sample data set is greater than 100, since the total amount of information interaction between the ε-nearest neighbor information communication network and the k-nearest neighbor information communication network is much smaller than that of the fully connected information communication network, the subsequent calculation complexity is greatly reduced and it has the advantage of faster iteration speed. Therefore, the two are more suitable for data sets with sample sizes greater than 100 to achieve more efficient state information interaction.
[0066] Furthermore, for data sets with relatively uniform sample distribution, that is, max(W)-min(W)≤0.2·max(W), the k-nearest neighbor information communication network can better capture the information interaction between similar samples; for data sets with non-uniform sample distribution, that is, max(W)-min(W)>0.2·max(W), the ε-nearest neighbor information communication network can better capture the information interaction between similar samples.
[0067] Therefore, in actual application, the information communication network construction method provided by the present invention is flexible and variable, and can specifically construct an available and efficient information communication network according to the different characteristics of the data sets.
[0068] 1.3 First-order consensus protocol realizes information exchange between intelligent agents
[0069] After building an information communication network, it is necessary to design a corresponding consistency protocol as a model for updating state information between agents, to guide the rules of information interaction between agents, including the frequency of agent communication, how agents process their own state information and information from neighboring agents. Therefore, the present invention proposes to use a first-order consistency protocol to simulate the state information update process between agents.
[0070] The design process of the first-order consensus protocol is as follows: Assume that there are n agents in a multi-agent system with an information communication network G, and the initial state information of agent i at t0 is y i (t0), i = 1, ..., n, then the change in state information update at the next moment for agent i is defined as:
[0071]
[0072] Where N(i) represents the set of neighboring agents that have information interaction links with agent i in the information communication network; w ijrepresents the information interaction intensity between agent i and agent j; y i (t p ) represents agent i at t p Status information at all times; is the change in the state information update of agent i at the next moment; therefore, the state information of agent i at the next moment is updated to
[0073] The first-order consensus protocol defines that the change of the agent's state information is controlled by the change of its adjacent agent's state, which is controlled by the relative state information of the adjacent agents in its information communication network. It helps the agent to adjust its own state according to the update of the neighbor's state, so that agents with similar state information can converge in the information communication network, thereby ensuring that the agents can reach a consensus on the joint state information and be classified into the same cluster.
[0074] Under this consensus protocol, the convergence speed of the agent to the consistent joint state information is determined by the second smallest eigenvalue λ2(G) of the Laplace matrix L(G) of the information communication network G, and the overall convergence performance is determined by the maximum eigenvalue λ n (G) Decision.
[0075] The Laplacian matrix L(G) of the information communication network G is obtained by subtracting the adjacency matrix A(G) of the information communication network G from the degree matrix D(G) of the information communication network G. The n eigenvalues of the Laplacian matrix L(G) are obtained by solving the formula |L(G)-λ·I|=0, where I represents the identity matrix and λ is the eigenvalue matrix; they are sorted in ascending order and are denoted as {λ1(G),λ2(G),...,λ n (G)}; λ2(G) is the second smallest eigenvalue. The larger the value, the faster the convergence rate of the agents in the system to the consistent joint state information; λ n (G) is the maximum eigenvalue. The smaller the value, the easier it is for the agents in the system to converge to consistent joint state information.
[0076] 2. Set the number of clusters for clustering the data set, use genetic algorithm to determine the optimal cut set of the information communication network, and use the optimal cut set to divide the information communication network into a set of multi-agent subsystems, thus obtaining the cluster set of the data set.
[0077] 2.1 Clustering Task Design
[0078] The clustering task of the data set is to divide the samples in the data set into a preset number of k non-overlapping clusters, denoted as {C i|i=1,2,...,k}; In this paper, samples are assumed to be agents, and a multi-agent system S is constructed based on the information communication network G{V,E,W} and the first-order consensus protocol, which converts the sample clustering task into a multi-agent collaborative grouping task.
[0079] Specifically, we need to find the cut set c = {e q ∈E|q=1,2,...m}(e q The qth information interaction link in the cut set is an edge of the information communication network; m represents the number of information interaction links in the cut set) so that the information communication network G is divided into k mutually disjoint sub-information communication networks {G i |i=1,2,...k}, that is, the multi-agent system is divided into k multi-agent subsystems {S i |i=1,2,...k}, each subsystem will converge to its own consistent joint state information under the control of the first-order consensus protocol. i |i=1,2,...k} and the cluster set {C i |i=1,2,...,k} one-to-one correspondence, multi-agent subsystem S i Multi-agents and clusters C in i The samples in the clustering task also correspond one to one, so the problem of finding the optimal cluster division is transformed into the problem of finding the optimal multi-agent subsystem division in the multi-agent collaborative grouping task.
[0080] 2.2 Clustering Concept Design
[0081] The optimal clustering problem requires that in the same cluster C i The similarity between samples in the multi-agent system is as high as possible, and the higher the similarity, the higher the information interaction intensity between agents in the multi-agent system. The convergence rate to the consistent joint state information under the control of the first-order consensus protocol is greater, and the maximum convergence rate is easier to achieve. Therefore, the optimal multi-agent subsystem partition problem requires the multi-agent subsystem S i Corresponding sub-information communication network G i The convergence rate to the consistent joint state information under the control of the first-order consensus protocol is as large as possible, and the convergence rate is as easy to achieve as possible, that is, the sub-information communication network G i The second smallest eigenvalue λ2(G i ) is as large as possible, the maximum eigenvalue λ n (G i ) as small as possible.
[0082] In addition, the optimal clustering problem requires that the sample similarity between different clusters is as low as possible, that is, cluster Ci With cluster C j The similarity is as low as possible. In the optimal multi-agent subsystem partitioning problem, clustering clusters C are required i With cluster C j The similarity is as low as possible, which is equivalent to requiring the corresponding multi-agent subsystem S i With multi-agent subsystem S j The information interaction intensity between agents is as low as possible. Therefore, the present invention constructs a multi-agent subsystem {S i |i=1,2,...k} in an information communication network G′ that embodies similar requirements for the optimal clustering problem.
[0083] Specifically, the present invention converts the multi-agent subsystem S i Abstract as virtual node v i , if the multi-agent subsystem S i There exists an agent i′ and a multi-agent subsystem S j The agent j′ in the original multi-agent system S has an information interaction link under the corresponding information communication network G, that is, e i′j′ =1, then the virtual node v i With virtual node v j There are also information exchange links in the information communication network G′; virtual node v i The state information of the multi-agent subsystem S i In addition, the information interaction intensity of the information interaction link is calculated as follows: Under the information communication network G, the multi-agent subsystem S i With multi-agent subsystem S j The average value of the information interaction strength of all information interaction links that exist between them.
[0084] Therefore, the requirement of the lowest similarity between clusters is transformed into the requirement that the convergence rate of the information communication network G′ to the consistent joint state information under the control of the first-order consistency protocol is as small as possible, and the difficulty of achieving the convergence rate is greater, that is, the second smallest eigenvalue λ2(G′) of the Laplace matrix of the information communication network G′ is as small as possible, and the maximum eigenvalue λ n (G′) is as large as possible.
[0085] In general, in the cut set c = {e q ∈E|q=1,2,...m}, the multi-agent system S is divided into k multi-agent subsystems {S i |i=1,2,...k}, for each subsystem S i Internally, it uses the corresponding sub-information communication network G iThe state information is updated under the control of the first-order consistency protocol. For each subsystem, the virtual information communication network G′ is used to update the state information of the subsystem under the control of the first-order consistency protocol. The state information within the subsystem and between subsystems is updated asynchronously. Under the division of the optimal cut set, the convergence speed within the subsystem will be greater than the convergence speed between subsystems. Therefore, the intelligent body within the subsystem will reach the consistent joint state information first, and naturally appear in the form of a cluster, achieving the clustering effect of the sample.
[0086] Based on the above ideas, the present invention defines the objective function as:
[0087]
[0088] 2.3 Clustering based on Multi-agent Cooperative Genetic Algorithm (CMACGA)
[0089] See attached Figure 4 , assuming that the data set to be clustered has a total of n sample points X = {i|i = 1, 2, ..., n}, and its corresponding sample features are x i , i=1,...,n, and then initialize the multi-agent system S, which contains n agents V={i|i=1,2,...,n}, agent i corresponds to sample point i one by one, and the initial state information y of agent i i (t0) is initialized to sample feature x i , that is, y i (t0) = x i , i = 1, ..., n, set the final number of clusters to k; then the clustering method steps are as follows:
[0090] Step 1: Select the Gaussian similarity function to calculate the information interaction intensity matrix between agents in
[0091] Step 2, construct the information communication network G = {V, E, W} corresponding to the multi-agent system S according to the selected information communication network construction method;
[0092] Step 3, initialize the number of iterations g = 0, the population size N, the number of parents n1, and the maximum number of iterations g max ;
[0093] Step 4: Randomly generate N cut sets, denoted as: P g ={c g1 ,c g2 ,...,c gN};
[0094] Step 5: Calculate the cut set P g The objective function F(c) corresponding to each cut set in the , and the cut set with the maximum objective function value is recorded as c * , then the objective function value is F(c * );
[0095] Step 6: Update the optimal cut set c best , let c best =c * ;
[0096] Step 7, from P g Select the first n1 cut sets with higher objective function values and combine them as parent sets;
[0097] Step 8: Use the selection operator, crossover operator, and mutation operator in the genetic algorithm to generate a new cut set P. g+1 ;
[0098] Step 9: Calculate the cut set P g+1 The objective function F(c) corresponding to each cut set in the , and the cut set with the maximum objective function value is recorded as c′, and the objective function value at this time is F(c′);
[0099] Step 10, determine whether F(c′) and F(c * ), if F(c′)≥F(c * ), then let c * = c′, otherwise c is not updated * ;
[0100] Step 11, update the number of iterations g = g + 1;
[0101] Step 12: Repeat steps 6 to 11 until the optimal cut set c is obtained. best In continuous No changes occur during the round, or until g ≥ g max ;
[0102] Step 13, based on the optimal cut set c best Generate the optimal multi-agent subsystem set {S i |i=1,2,...k}, and output the corresponding optimal clustering cluster set {C i |i=1,2,...,k}.
[0103] Through the above steps, the agents are clustered and finally the optimal cut set c is obtained. best and cluster set {C i|i=1,2,...,k}. The optimal cut set outputs the information interaction link set corresponding to the optimal collaborative grouping of the multi-agent system, and the optimal clustering cluster set outputs the k mutually non-overlapping clusters generated by the samples in the data set under the optimal cut set division.
[0104] Example:
[0105] Data preparation,First, we need to generate different test data to test the efficiency of the clustering algorithm.,The following three sets of data are generated: non-convex data sets with normal distribution,,concentric circles, and double crescents. Each data set can be clustered into two clusters.,The proposed multi-agent collaborative genetic algorithm (CMACGA), k-means clustering,,birch clustering, DBSCAN clustering, hierarchical clustering, and spectral clustering are used to cluster,the data sets.
[0106] This example gives several indicators used to measure the performance of various clustering methods, namely: Jaccard coefficient index (JC), Fowlkes and Mallows index (FMI), Rand index RI. These three calculation indicators are commonly used indicators used to measure the performance of clustering algorithms. The values of these three indicators are between [0,1]. The larger the value, the better the clustering effect, and vice versa. The smaller the value, the worse the clustering effect.
[0107] For the results corresponding to different clustering algorithms, three indicators are used to measure their performance. Since the cluster data with normal distribution is easy to cluster and can be distinguished well, all clustering methods perform well and cluster the samples into two clusters consistent with the original true labels. However, for slightly more complex data sets such as concentric circles and double crescent non-convex data, only the clustering method based on multi-agent consensus genetic algorithm (CMACGA), DBSCAN clustering method and spectral clustering method can cluster the samples into two clusters consistent with the original true labels. The specific results are shown in Table 1.
[0108] Table 1 Clustering performance of different clustering methods on three data sets
[0109]
[0110] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A clustering method based on a multi-agent system, characterized in that: include: Obtain a data set to be clustered, treat the data set as a multi-agent system, and the samples in the data set as multi-agents, construct an information communication network corresponding to the multi-agent system, and convert the clustering task of the samples into a multi-agent collaborative grouping task; the information communication network is characterized by a set of agents, a set of information interaction links between agents, and a set of information interaction strengths between agents; wherein the samples correspond one-to-one to the multi-agents, and the sample features serve as the initial state information of the agents; Use Gaussian similarity function to calculate the information interaction intensity between agents; The number of clusters for clustering the data set is set, the optimal cut set of the information communication network is determined using a genetic algorithm, and the information communication network is divided into a set of multi-agent subsystems using the optimal cut set, thereby obtaining a cluster set of the data set.
2. The clustering method based on multi-agent system according to claim 1, characterized in that: The Gaussian similarity function is used to calculate the information interaction intensity between agents, which is expressed as: where w ij is the information interaction intensity between agent i and agent j, e is a natural constant, y i (t0) and y j (t0) are the initial state information of agent i and agent j respectively; δ is the preset bandwidth parameter of the Gaussian kernel function.
3. The clustering method based on multi-agent system according to claim 1, characterized in that: There are three types of information communication networks, including fully connected information communication networks, ε-neighbor information communication networks, and k-nearest neighbor information communication networks; For a fully connected information communication network, each node has an information interaction link with other nodes; For the ε-neighboring information communication network, when the information interaction intensity between agent i and agent j is less than the threshold ε, there is an information interaction link between agent i and agent j; ε is in [min(W ε ),mean(W ε )], where min(W ε ) represents the information interaction intensity set W between agents ε The minimum value, mean(W ε ) indicates W ε The mean of For the k-neighbor information communication network, agent i only establishes information interaction links with its k nearest neighbor agents; the value of k is 30% to 50% of the sample size of the dataset.
4. The clustering method based on multi-agent system according to claim 1, characterized in that: In the information communication network, intelligent agents exchange information through a first-order consensus protocol; Assume that there are n agents in a multi-agent system with an information communication network G, and the initial state information of agent i at time t0 is y i (t0), i = 1, ..., n, then the change in state information update at the next moment for agent i is defined as: Where N(i) represents the set of neighboring agents that have information interaction links with agent i in the information communication network; w ij represents the information interaction intensity between agent i and agent j; y i (t p ) represents agent i at t p Status information at all times; is the change in the state information update of agent i at the next moment; Therefore, the state information of agent i at the next moment is updated as 5. The clustering method based on multi-agent system according to claim 1, characterized in that: The objective function of the genetic algorithm is expressed as follows: Where c represents the cut set, k represents the number of clusters; the cut set c divides the information communication network G into k mutually disjoint sub-information communication networks {G i |i=1,2,...k}, and then divide the multi-agent system into k multi-agent subsystems {S i |i=1,2,...k}; G′ represents the multi-agent subsystem {S i |i=1,2,...k} information communication network; sub-information communication network G i The second smallest eigenvalue of the Laplace matrix is λ2(G i ), the maximum eigenvalue is λ n (G i ); The second smallest eigenvalue of the Laplacian matrix of the information communication network G′ is λ2(G′), and the largest eigenvalue is λ n (G′).
6. The clustering method based on multi-agent system according to claim 5, characterized in that: The multi-agent subsystem {S i The information communication network between |i=1,2,...k} is constructed as follows: The multi-agent subsystem S i Abstract as virtual node v i , if the multi-agent subsystem S i There exists an agent i′ and a multi-agent subsystem S j The agent j′ in the multi-agent system S has an information exchange link under the corresponding information communication network G, then the virtual node v i With virtual node v j There are also information exchange links in the information communication network G′; virtual node v i The state information of the multi-agent subsystem S i The information interaction intensity of the information interaction link is calculated as: Under the information communication network G, the multi-agent subsystem S i With multi-agent subsystem S j The average value of the information interaction strength of all information interaction links that exist between them.
7. The clustering method based on multi-agent system according to claim 1, characterized in that: The steps of the genetic algorithm are as follows: Step 1, select the Gaussian similarity function to calculate the information interaction intensity matrix W between the agents; Step 2: construct the information communication network G = {V, E, W} corresponding to the multi-agent system S, where V is the set of agents, that is, the set of nodes in the information communication network; E is the set of information interaction links between agents, that is, the set of edges in the information communication network; Step 3, initialize the number of iterations g = 0, the population size N, the number of parents n1, and the maximum number of iterations g max ; Step 4: Randomly generate N cut sets, denoted as: P g ={c g1 ,c g2 ,...,c gN }, where c gN represents the Nth cut set; Step 5: Calculate the cut set P g The objective function F(c) corresponding to each cut set in the , and the cut set with the maximum objective function value is recorded as c * , then the objective function value is F(c * ); Step 6: Update the optimal cut set c best , let c best =c * ; Step 7, from P g Select the first n1 cut sets with higher objective function values and combine them as parent sets; Step 8: Use the selection operator, crossover operator, and mutation operator in the genetic algorithm to generate a new cut set P. g+1 ; Step 9: Calculate the cut set P g+1 The objective function F(c) corresponding to each cut set in the , and the cut set with the maximum objective function value is recorded as c′, and the objective function value at this time is F(c′); Step 10, determine whether F(c′) and F(c * ), if F(c′)≥F(c * ), then let c * = c′, otherwise c is not updated * ; Step 11, update the number of iterations g = g + 1; Step 12: Repeat steps 6 to 11 until the optimal cut set c is obtained. best In continuous No changes occur during the round, or until g ≥ g max ; Step 13, based on the optimal cut set c best Generate the optimal multi-agent subsystem set {S i |i=1,2,...k}, and generate the optimal cluster set {C i |i=1,2,...,k}.
8. A positioning device, comprising a processor, a memory and a computer program stored in the memory; when the processor executes the computer program, the clustering method based on the multi-agent system according to any one of claims 1-7 is implemented.
9. A computer-readable storage medium, wherein a computer program is stored in the medium; when the computer program is executed by a processor, the clustering method based on a multi-agent system according to any one of claims 1 to 7 is implemented.
10. A data partitioning device, which uses the clustering method based on a multi-agent system according to any one of claims 1-7 when performing data partitioning.