A computer-implemented method for clustering nodes i, j which can jointly generate a set of documents or datasets, said communications network comprising a number M of nodes, nodes i, j being associated with edges Aij of an adjacency matrix A,
- a document edge Wij of text data by edge Aij, the document edge Wij being a vector Wij=(Wij1, . . . , Wijd, . . . , WijDij) of size Dij the number of documents shared by or resulting of the interaction between the node i and the node j, where Wijd is the text of the dth document shared by or resulting of the interaction between the node i and the node j, the method comprising steps of:
- 1) a first step of initially clustering all the nodes into a predetermined number Q of clusters, for determining a first estimated clustering Y=Y1, Y2, . . . , YM), M being the number of nodes;
- 2) a second step of inference of a generative model, wherein edges Aij are modeled with a Stochastic Block Model (SBM) and, conditionally to the estimated clustering Y, the sets of documents Wijd between and within clusters are modeled according to a generative model of documents,
- the second step of inference comprising the following sub-steps:
- a. for each cluster q, determining from the estimated clustering Y, an estimated proportion ρq of the cluster q, an estimated probability πqr that a node included in the cluster q and a node included in the other cluster r are associated with text data in the network;
- b. determining from the estimated clustering Y, an estimated distribution R(Z,θ), and an estimated probability β, with:
- Zijdn a topic vector indicating a topic of the word n of the text document Wijd, said word corresponding to Wijdn, θqrk an estimated probability of the topic k of text data associated between the cluster q and the cluster r, making for a vector of topic proportions θqr, βkv a probability of each word v of dictionary being used in the topic k;
- the sub-step b) comprising the following sub-steps:
- b1. for each cluster q, aggregating all the messages Wijd of text data associated with all the pair of nodes (i,j) within the cluster q, so as to produce a first aggregate of text data associated with the cluster q, and for each cluster q, aggregating all the messages Wijd of text data associated with all the pair of nodes (i, j), from which one of the nodes i belongs to the cluster q and the other node j belongs to another cluster r, so as to produce at least one second aggregate associated to the pair of clusters (q,r),
- b2. processing the first and second aggregates to determine topics k corresponding to text data of the first and second aggregates, with a predetermined number K of topics being determined, and
- b3. processing the text data of the first and second aggregates to determine the distribution R(Z,θ) and the probability β;
- b4. iteratively repeating sub-step b1, b2 and b3 of second step 2);
- c. calculating a new estimated clustering Y of the nodes into Q clusters, in accordance with calculated probabilities (β, ρ, π and the estimated distribution R(Z,θ) of the sub-steps a and b of the second step, by determining, for each node i of the network, which optimal cluster provides a maximum value of a statistical criterion when said node i is assigned to said cluster, and assigning a node i to the determined optimal cluster;
- 3) a third step in which the second step 2) is repeated, with the new estimated clustering Y calculated in sub-step c and injected in the step 2), until a convergence criterion is fulfilled for determining and outputting a final clustering Y, the final proportion ρq, the final distribution R(Z,θ), the final probabilities πqr, and the final probability βkv.