ballaneypranav / cs50ai

Solutions for CS50 Artificial Intelligence 2020 Assignments
31 stars 24 forks source link

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

Open mowhammadrezaa opened 4 years ago

mowhammadrezaa commented 4 years ago

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.

dtemir commented 3 years ago

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.