January 2019
Beginner to intermediate
154 pages
4h 31m
English
The PageRank algorithm was designed by founders of Google in 1996. The Google search engine used this algorithm to assign ranks to each web page. PageRank was used to rank the web pages based on how many pages point to a given page. This means, the higher the number of links, the higher the importance of the web page. Obviously, PageRank is not that simple after all, as there are some other factors that are being used in this algorithm. In our example, we can apply PageRank to find out the importance of each person in our graph:
#Pythonfrom pyspark.sql.functions import descranks = graph.pageRank(resetProbability=0.15, maxIter=10)ranks.vertices.orderBy(desc("pagerank")).select("id", "pagerank").show(3)Out:+---+------------------+ ...Read now
Unlock full access