https://github.com/baccega/page-rank-and-hits
đđ C++ implementation of two link analysis algorithms: PageRank (Google) by Sergey Brin and Lawrence Page and HITS (Ask.com) by Jon Kleinberg.
https://github.com/baccega/page-rank-and-hits
compressed-sparse-row cpp hits-algorithm information-retrieval link-analysis mmap pagerank-algorithm
Last synced: 3 months ago
JSON representation
đđ C++ implementation of two link analysis algorithms: PageRank (Google) by Sergey Brin and Lawrence Page and HITS (Ask.com) by Jon Kleinberg.
- Host: GitHub
- URL: https://github.com/baccega/page-rank-and-hits
- Owner: Baccega
- License: mit
- Created: 2022-04-14T11:57:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-03T09:39:23.000Z (over 2 years ago)
- Last Synced: 2025-02-01T20:45:49.113Z (5 months ago)
- Topics: compressed-sparse-row, cpp, hits-algorithm, information-retrieval, link-analysis, mmap, pagerank-algorithm
- Language: C++
- Homepage:
- Size: 9.8 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# đđ PageRank / HITS computation

![]()
PageRank (Google)
![]()
HITS (Ask.com)
C++ implementation of the **PageRank** algorithm (Google) by Sergey Brin and Lawrence Page and the **HITS** algorithm (Ask.com) by Jon Kleinberg, that uses a **CSR** (Compressed Sparse Row) matrix and **mmap** to minimize memory usage.
This script computes the top-k nodes based on the rankings of the two algorithms, adds the in-degree of the node, and calculates the Jaccard coefficient between the results.
This project is the assignment for the course **Information Retreival and Web Search 2021/2022**.
See **[Assignment.pdf](Assignment.pdf)** for more details on the assignment.
See **[Report.pdf](report.pdf)** for more details on the implementation.
The assets are from the **SNAP Datasets** by Jure Leskovec and Andrej Krevl, available [here](http://snap.stanford.edu/data).
## đ§ Building
```bash
mkdir build
cd build
cmake ..
make
```## đšī¸ Usage
```
./pagerank-hits [filename] [topK] [dampingFactor]Find top-K results of each algorithm in the graph and the Jaccard's coeffiecient between the algorithms.
OPTIONS:
filename The graph to process (default: assets/web-NotreDame.txt)
topK Set top-K number (default: 20)
dampingFactor Set PageRank's damping factor (default: 0.85)```
If you run `./pagerank-hits` without arguments it will run with the default arguments, so it's the same as writing:
```
./pagerank-hits assets/web-NotreDame.txt 20 0.85
```