The code can only be run in Matlab.
The main function of LPCS method is "main_LPCS.m"
We firstly use the Fast Modularity Optimization (FMO) algorithm proposed by Blondel et al.(the reference [38] in our paper) to detect the community structure,which has been perfectly realized in R software. Install igraph package in R software, then we can call function "multilevel.community" to detect communities, which return m vectors. m is the total levels of the community hierarchy. Each vector represents a set of the community label each node belonging to.
Then we can use "main_LPCS.m" to map the network into hyperbolic space, which returns a radial and a angular coordinates vector containing the hyperbolic coordinates of all the nodes.
According to the hyperbolic coordinates and the link prediction index, we can predict missing links.