Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am using this technique to find the PR of these 3 pages. It converges to something it shouldn't be. I tried the same iteration in Java and 2 pages come up with 1.333 and the other one as 0.666. Mathematica is calculating something differently. Here's my code:

g = {"Netscape" -> "Amazon", "Netscape" -> "Netscape", 
   "Amazon" -> "Netscape", "Amazon" -> "Microsoft", 
   "Microsoft" -> "Amazon"};
pr = PageRankVector[g]
GraphPlot[g, 
 VertexRenderingFunction -> (Text[
     Framed[#2 <> "\n" <> 
       ToString[pr[[#3]]], {Background -> RGBColor[1, 1, 0.8], 
       FrameStyle -> RGBColor[0.94, 0.85, 0.36]}], #1] &), 
 DirectedEdges -> True]
share|improve this question
    
You probably have a problem in your Java code or others settings for TeleportProbability. But 1.333 and 0.666 doesn't add up to one, which it should, so I am positive that you have an error in your Java code. –  Pickett Jan 27 at 21:44
    
How do I set Teleport in Mathematica to 0? And in my Java, I am not using any damping at all, so it's the plain PR formula, as described here infolab.stanford.edu/~ullman/mining/websearch.pdf. I am getting the same results as Stanford, so probably because Mathematica is indeed using a teleportation probability. –  Ali Gajani Jan 27 at 22:35
    
You have to look in the documentation. ` PageRankVector[g,TeleportProbability->0]` –  Ajasja Jan 28 at 21:38
add comment

1 Answer

In the case that this does not closed I'll answer this temporarily (so that there won't be so many unaswerd questions aound)

The problem is TeleportProbability as guessed by @Pickett. To set it to 0 you just have to look in the documentation.

PageRankVector[g,TeleportProbability->0]

share|improve this answer
    
Unfortunately setting the value to zero will cause The value of option TeleportProbability -> 0 should be a positive machine real number less than 1. and setting it to a small value did not produce the right result for me. I also tried some other things, but alas could not replicate the paper's result. –  Pickett Jan 28 at 21:56
    
@Pickett Should I delete this A then? –  Ajasja Jan 29 at 9:00
    
Probably, the intention was right but in this case TeleportProbability seems to be only a part of the problem. The answer is probably TeleportProbability+normalization+some other difference. –  Pickett Jan 29 at 9:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.