Assignment3_Report.pdf - CS6200 Section 2 Assignment 3...

Info icon This preview shows pages 1–3. Sign up to view the full content.

CS6200 Section 2 Assignment 3 Amogh Huilgol Design Discussion The pre-processing algorithm follows the steps as specified in the problem statement. We have chosen the parser that has been provided along with the problem. In the pre-processing algorithm, we use the parser to find the node- name and adjacency list. While finding node-name and adjacency list, we ignore all the links that have the symbol ‘~’ in the link. We also remove the path name and .html suffix thereby retaining only the page name. Pseudo-Code for Pre-Processing The pseudo-code to pre-process the Wikipedia dump and obtain the graph is as follows method map(Key k, value v): name ß Parse v to obtain page-name adjacencyList ß Parse v to obtain adjacencyList emit(name, adjacencyList) for each record r in adjacencyList: emit(r, null); end method reduce(pageName p, adjacencyList [l1, l2, l3, …]): pageCountCounter ß new Global Counter if ( isInlinksPresent() or isOutLinksPresent()): pageCountCounter ß pageCountCounter + 1 if(adjacencyList is null): emit(p, new adjacencyList[]) return emit(p, adjacencyList)
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

CS6200 Section 2 Assignment 3 Amogh Huilgol Pseudo Code for Page Rank The Page rank algorithm is modified to handle the dangling node adjustment. The dangling node adjustment is done in map function and is updated through global counter. method map(Key k , Value v): alpha ß Initialize alpha component of page rank pageCount ß Extract pageCount from counters delta ß get delta from counters emit(k, v) newPageRank ß v.pageRank + (1-alpha) * delta/pageCount for each entry e in v.adjacencyList : emit(e, newPageRank/sizeOf(adjacencyList) if(v.adjacencyList is empty): emit(dummy, newPageRank) END method reduce(Node n , List[dummy, c1,c2,c3]): if(n is dummy): for each contribution ‘c’ in List : totalContributions ß totalContributions + c update delta gobal counter with totalContribution return Node n1 ß
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '18
  • PageRank, Amogh Huilgol, CS6200 Section

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern