cs50ai icon indicating copy to clipboard operation
cs50ai copied to clipboard

You are not considering the condition Whether we are on page which links to 'i' or not.

Open mowhammadrezaa opened this issue 4 years ago • 1 comments

https://github.com/ballaneypranav/cs50ai/blob/4712bfe34936baea554f86decbc2ae9ad1fb0dca/2_uncertainty/pagerank/pagerank.py#L137

You are not considering this condition: For the second condition, we need to consider each possible page i that links to page p. In the code: https://github.com/ballaneypranav/cs50ai/blob/4712bfe34936baea554f86decbc2ae9ad1fb0dca/2_uncertainty/pagerank/pagerank.py#L140 you summed up all the pages' distributions. Take a look at my fork of your work. I have it corrected.

mowhammadrezaa avatar Jul 19 '20 10:07 mowhammadrezaa

I noticed that too. Couldn't find your fork. Were you able to resolve the issue? In my case, I also had to normalize values in the iterative_pagerank .

dtemir avatar Nov 18 '20 02:11 dtemir