Implementing PageRank using MapReduce

前端 未结 3 802
长发绾君心
长发绾君心 2021-01-31 22:42

I\'m trying to get my head around an issue with the theory of implementing the PageRank with MapReduce.

I have the following simple scenario with three nodes: A B C.

3条回答
  •  Happy的楠姐
    2021-01-31 23:16

    We iteratively evaluate PR. PR(x) = Sum(PR(a)*weight(a), a in in_links) by

    map ((url,PR), out_links) //PR = random at start
    for link in out_links
       emit(link, ((PR/size(out_links)), url))
    
    reduce(url, List[(weight, url)):
       PR =0
       for v in weights
           PR = PR + v
       Set urls = all urls from list
    
       emit((url, PR), urls)
    

    so the output equals input and we can do this until coverage.

提交回复
热议问题