Research Article
The Algorithm of Link Prediction on Social Network
Algorithm 2
KatzGF algorithm.
Input: social network graph , node , node | Output: the similarity of node and node | The description of the algorithm: | (1) Find all paths between node and node which length are less then 6. Put all the | nodes in the paths into the set .path_nodes. Record the length of each path. | (2) Extract the sub-graph which contains the tested node pair and all the nodes in their paths. | (3) for (from the first path to the last path){ | (4) while (the nodes set of the path is not null){ | (5) Calculate the degree of node , and get .degree. Calculate the degree of node | in the extracted sub-graph in the Step 2, get .path_degree. | Calculate the guidance capability of this node | Guidance-capability. . | (6) Calculate the weight of this path Guidance_capability.path+ = Guidance_capability.. | (7) Calculate the similarity of node and node Similarity.+ = Guidance_capability.path} |
|