edu.uci.ics.jung.algorithms.importance
Class PageRankWithPriors

java.lang.Object
  extended byedu.uci.ics.jung.algorithms.IterativeProcess
      extended byedu.uci.ics.jung.algorithms.importance.AbstractRanker
          extended byedu.uci.ics.jung.algorithms.importance.RelativeAuthorityRanker
              extended byedu.uci.ics.jung.algorithms.importance.PageRank
                  extended byedu.uci.ics.jung.algorithms.importance.PageRankWithPriors

public class PageRankWithPriors
extends PageRank

Algorithm that extends the PageRank algorithm by incorporating root nodes (priors). Whereas in PageRank the importance of a node is implicitly computed relative to all nodes in the graph now importance is computed relative to the specified root nodes.

Note: This algorithm uses the same key as PageRank for storing rank sccores

A simple example of usage is:

 PageRankWithPriors ranker = new PageRankWithPriors(someGraph,0.3,1,rootSet,null);
 ranker.evaluate();
 ranker.printRankings();
 

Running time: O(|E|*I) where |E| is the number of edges and I is the number of iterations until convergence

Author:
Scott White
See Also:
"Algorithms for Estimating Relative Importance in Graphs by Scott White and Padhraic Smyth, 2003"

Field Summary
 
Fields inherited from class edu.uci.ics.jung.algorithms.importance.PageRank
KEY
 
Fields inherited from class edu.uci.ics.jung.algorithms.importance.RelativeAuthorityRanker
PRIOR_KEY
 
Fields inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
DEFAULT_EDGE_WEIGHT_KEY
 
Constructor Summary
PageRankWithPriors(DirectedGraph graph, double beta, java.util.Set priors, java.lang.String edgeWeightKeyName)
          Constructs an instance of the ranker.
 
Methods inherited from class edu.uci.ics.jung.algorithms.importance.PageRank
getRankScoreKey
 
Methods inherited from class edu.uci.ics.jung.algorithms.importance.RelativeAuthorityRanker
setPriorRankScore
 
Methods inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
getEdgeWeightKeyName, getRankings, getRankScore, getRankScores, isRankingNodes, printRankings, setNormalizeRankings, setRemoveRankScoresOnFinalize, setUserDefinedEdgeWeightKey
 
Methods inherited from class edu.uci.ics.jung.algorithms.IterativeProcess
evaluate, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, hasConverged, relativePrecision, setDesiredPrecision, setMaximumIterations
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageRankWithPriors

public PageRankWithPriors(DirectedGraph graph,
                          double beta,
                          java.util.Set priors,
                          java.lang.String edgeWeightKeyName)
Constructs an instance of the ranker.

Parameters:
graph - the graph whose nodes are being ranked
beta - the prior weight to put on the root nodes
priors - the set of root nodes
edgeWeightKeyName - the user datum key associated with any user-defined weights. If there are none, null should be passed in.