๐ Python implementation of famous link analysis algorithms.
I have written three articles to explain the concept and implementation of these three algorithms. Feel free to click on the link!
Get a copy of this repo using git clone
git clone https://github.com/chonyy/PageRank-HITS-SimRank.git
Run the program with dataset provided and default values for damping_factor = 0.15, decay_factor = 0.9 and iteration = 100
python main.py -f 'dataset/graph_1.txt'
Run program with dataset and cusotm parameters
python main.py --input_file 'dataset/graph_1.txt' --damping_factor 0.15 --decay_factor 0.9 --iteration 500
The order of the result follows the order of the node value. For example, 1, 2, 5, 7
.
A new folder with the name same with the graph will be created in the result directory. Four txt files will be created to store the value printed on the console.
- graph_HITS_authority.txt
- graph_HITS_hub.txt
- graph_PageRank.txt
- graph_SimRank.txt