Skip to content

Port to Python3 and add PageRank #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vmarkovtsev
Copy link

No description provided.

@erikbern
Copy link
Owner

Isn't page rank almost the same algorithm but just with a bit of regularization?

vmarkovtsev added a commit to vmarkovtsev/eigenstuff that referenced this pull request Mar 17, 2017
Related to erikbern#2
Simple removal of all edges from Go to * makes:
| 22.76% |                 java |
| 15.73% |                   go |
| 14.31% |                    c |
| 13.46% |                  c++ |
|  6.83% |                   c# |
|  6.12% |               python |
|  5.70% |                scala |
|  3.98% |                 rust |
|  2.93% |                  php |
|  2.02% |          objective c |
|  1.54% |                 ruby |
|  1.07% |                swift |
|  1.00% |                 node |
|  0.65% |               kotlin |
|  0.40% |                    r |
|  0.30% |               matlab |
|  0.28% |              haskell |
|  0.24% |               pascal |
|  0.21% |                cobol |
|  0.13% |               erlang |
|  0.11% |              fortran |
|  0.10% |         visual basic |
|  0.07% |                  lua |
|  0.05% |              clojure |
|  0.02% |                 perl |
|  0.01% |                 lisp |
@vmarkovtsev
Copy link
Author

vmarkovtsev commented Mar 17, 2017

This is related to http://snap.stanford.edu/class/cs246-2013/slides/09-pagerank.pdf page 35. This is not the regularization but rather a mere necessity. And for god sake don't even try vanilla PI on large stochastic graphs - it does not converge at all. I tried many times :-)

@erikbern
Copy link
Owner

I'm pretty sure this is equivalent to Tikhonov regularization: https://en.wikipedia.org/wiki/Tikhonov_regularization

And from a Bayesian point of view it's equivalent to putting normal priors on the stationary distribution.

I could be wrong though!

@vmarkovtsev
Copy link
Author

I am unable to check this - I am not familiar with Bayesian inference (shame on me). All right, let it be the regularization. As we know, it is better to have a regularized model than not :) . I suggest to change the unregularized PI code to page_rank code. Do you approve?

@erikbern
Copy link
Owner

i'm curious to see how much it changes the results... probably a little bit. let me run a side by side comparison and check

@vmarkovtsev
Copy link
Author

I think that regarding the referencing PR, page_rank does not change it's result while direct PI changes dramatically. Since I did tiny changes to the matrix, I call it instability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants