Skip to content

Instantly share code, notes, and snippets.

View pippellia-btc's full-sized avatar
🎯
Focusing

pippellia pippellia-btc

🎯
Focusing
View GitHub Profile
@pippellia-btc
pippellia-btc / gist:8642a25fcf535edcda1ddecd0bcd5f7b
Last active December 2, 2025 16:41
How to display Pagerank by Vertex

Displaying pagerank is quite complex, since most end users don't know what it is and how it's defined.
Furthermore, Pagerank follows a power-law, which is inherently hard for humans to understand.

An easier way to understand the pagerank p of an entity is to display the % of the network it is part of. Something like "entity is part of the top 1%". However sometimes we wish to display the pagerank as a 0-100 score. The linear mapping $f(p) = 100p$ is really really poor to understand for humans.

Considering the power law model with exponent b and a graph of N nodes, the highest j-th node by pagerank has

$p(j) = \frac{(1-b)}{N} \cdot N^b \cdot j^{-b}$