## 3 Computational Methodology
### CORE-Clustering Algorithms
#### 3.2.2 CORE-Clustering Algorithm  
In contrast with other clustering techniques, this CORE-clustering approach detects clusters having an explicitly controlled granularity level, and only gathers nodes/variableswith a maximal path capacity. CORE-clusters are detected from the maximal spanning tree \(G(N,T)\) by gathering iteratively its nodes \(N\) in an order that depends on the edge weights in \(T\) (increasing weight order). A detected CORE-cluster has a size higher than \(\tau\), where \(\tau\) is the parameter that controls the granularity level. Thus, Algorithm 2 first generates many small and meaningless clusters and parameter \(\tau\) should not be too small to avoid considering these clusters as CORE-clusters. Then, the first pertinent clusters will be established using the edges of \(T\) with larger weights, leading to pertinent node groups. Finally, the largest weights of \(T\) are treated at the end of Algorithm 2 in order to split into several CORE-clusters the nodes related to the most influential nodes/variables.  
```
0: Graph \(G(N,T)\) with nodes \(N_{i}\), \(i\in 1,\cdots,p\); and edges \(T_{k}\), \(k\in 1,\cdots,K_{T}\).
0: Weight of edge \(T_{k}\) is \(W(T_{k})\).
0: Granularity coefficient \(\tau\) and threshold \(\xi\).
1: {Initiate the algorithm}
2: Sort the edges by increasing weights;
3: Assign label \(L(N_{i})=i\) to each node \(N(i)\) and set \(CORElabel=-1\).
4: {CORE-clusters detection}
5:for\(k=1:K_{T}\)do
6: We denote \(N_{i}\) and \(N_{j}\) the nodes linked by edge \(E_{k}\).
7: if \(L(N_{i})!=L(N_{j})\)then
8: Propagate the label \(L(N_{i})\) to the nodes that have label \(L(N_{j})\).
9: if number of nodes with label \(L(N_{i})\in\{\tau,\cdots,2\tau-1\}\)then
10: Label \(CORElabel\) is given to the nodes with label \(L(N_{i})\)
11:\(CORElabel=CORElabel-1\)
12:endif
13:endif
14:endfor
15: {Post-treatment of the labels}
16:for\(n=1:N\)do
17: If \(L(N_{n})>0\)then\(L(N_{n})=0\) else \(L(N_{n})=-L(N_{n})\)
18:endfor
19: {Filter the CORE-clusters \(S_{\xi,\tau}^{u}\) s.t. \(\mathbf{c}(S_{\xi,\tau}^{u})<\xi\)}
20:for\(u=1:U\)do
21: If \(\mathbf{c}(S_{\xi,\tau}^{u})<\xi\)then Set \(L(N_{n})=0\) to the nodes \(N_{n}\) of \(S_{\xi,\tau}^{u}\).
22:endfor
23:return Labels \(L\).
```  
**Algorithm 2** CORE-clustering algorithm  
It is worth mentioning that the Rows 20 to 25 of Algorithm 2 are the only ones that require to compute the coherence \(\mathbf{c}\) of the estimated CORE-clusters. Computing a coherence Equation (3) is indeed demanding, so it is considered here as a post-treatment limited to pre-computed CORE-clusters. In practice, it is also performed on the maximal spanning tree \(G(N,T)\) and not on the whole graph \(G(N,E)\).  
Remark too that the algorithmic structures of Algorithms 1 and 2 are similar. However, Algorithm 2 runs on \(G(N,T)\) and not on \(G(N,E)\). The number of edges \(K_{T}\) in \(G(N,T)\) is much lower than \(K_{E}\), since \(T\) has a tree structure and not a complete graph structure. It should indeed be slightly higher than \(p\)[27], which is much lower than \(K_{E}=p(p-1)/2\). Moreover, the propagation algorithm (rows 9 and 11) will then never propagate labels on more than \(2\tau-1\) nodes. The algorithmic cost of the sort procedure (row 1) is then \(\mathcal{O}(K_{T}\log{(K_{T})})\) and the average performance of the for loop \(\mathcal{O}(K_{T}\log{(\tau)})\).