edu.uci.ics.jung.algorithms.importance
Class HITSWithPriors<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.util.IterativeProcess
      extended by edu.uci.ics.jung.algorithms.importance.AbstractRanker<V,E>
          extended by edu.uci.ics.jung.algorithms.importance.RelativeAuthorityRanker<V,E>
              extended by edu.uci.ics.jung.algorithms.importance.HITSWithPriors<V,E>
All Implemented Interfaces:
IterativeContext

Deprecated. As of JUNG 2.0 beta, replaced with HITSWithPriors.

public class HITSWithPriors<V,E>
extends RelativeAuthorityRanker<V,E>

Algorithm that extends the HITS algorithm by incorporating root nodes (priors). Whereas in HITS 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.

A simple example of usage is:

 HITSWithPriors ranker = new HITSWithPriors(someGraph,0.3,rootSet);
 ranker.evaluate();
 ranker.printRankings();
 

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

Author:
Scott White, Tom Nelson - adapted to jung2
See Also:
"Algorithms for Estimating Relative Importance in Graphs by Scott White and Padhraic Smyth, 2003"

Field Summary
protected static String AUTHORITY_KEY
          Deprecated.  
protected static String HUB_KEY
          Deprecated.  
 
Fields inherited from class edu.uci.ics.jung.algorithms.importance.RelativeAuthorityRanker
priorRankScoreMap
 
Fields inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
edgeRankScores, vertexRankScores
 
Constructor Summary
HITSWithPriors(Graph<V,E> graph, boolean useAuthorityForRanking, double bias, Set<V> priors, String edgeWeightKey)
          Deprecated. More specialized constructor where the type of importance can be specified.
HITSWithPriors(Graph<V,E> graph, double bias, Set<V> priors)
          Deprecated. Constructs an instance of the ranker where the type of importance that is associated with the rank score is the node's importance as an authority.
 
Method Summary
protected  void finalizeIterations()
          Deprecated. Cleans up all of the prior rank scores on finalize.
protected  double getInEdgeWeight(E e)
          Deprecated.  
protected  double getPreviousAuthorityScore(V v)
          Deprecated.  
protected  double getPreviousHubScore(V v)
          Deprecated.  
 String getRankScoreKey()
          Deprecated. the user datum key used to store the rank scores
protected  void initialize(Graph<V,E> g, String edgeWeightKeyName)
          Deprecated.  
protected  void setInEdgeWeight(E e, double weight)
          Deprecated.  
 void setUseAuthorityForRanking(boolean useAuthorityForRanking)
          Deprecated. If evaluate() has not already been called, the user can override the type of importance.
 void step()
          Deprecated. Evaluate the result of the current iteration.
protected  void updateAuthorityRankings()
          Deprecated.  
protected  void updateHubRankings()
          Deprecated.  
protected  void updatePreviousScores()
          Deprecated.  
 
Methods inherited from class edu.uci.ics.jung.algorithms.importance.RelativeAuthorityRanker
getPriorRankScore, getPriors, setPriorRankScore, setPriors
 
Methods inherited from class edu.uci.ics.jung.algorithms.importance.AbstractRanker
assignDefaultEdgeTransitionWeights, getEdgeRankScore, getEdgeRankScore, getEdgeRankScores, getEdgeRankScores, getEdgeWeight, getEdgeWeights, getGraph, getRankings, getRankScores, getVertexCount, getVertexRankScore, getVertexRankScore, getVertexRankScores, getVertexRankScores, getVertices, initialize, isRankingEdges, isRankingNodes, normalizeEdgeTransitionWeights, normalizeRankings, onFinalize, printRankings, removeEdgeRankScore, removeEdgeRankScore, removeVertexRankScore, removeVertexRankScore, reset, setEdgeRankScore, setEdgeRankScore, setEdgeWeight, setEdgeWeights, setNormalizeRankings, setRemoveRankScoresOnFinalize, setVertexRankScore, setVertexRankScore
 
Methods inherited from class edu.uci.ics.jung.algorithms.util.IterativeProcess
done, evaluate, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, getStatus, hasConverged, initializeIterations, relativePrecision, setDesiredPrecision, setMaximumIterations, setPrecision
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTHORITY_KEY

protected static final String AUTHORITY_KEY
Deprecated. 
See Also:
Constant Field Values

HUB_KEY

protected static final String HUB_KEY
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

HITSWithPriors

public HITSWithPriors(Graph<V,E> graph,
                      double bias,
                      Set<V> priors)
Deprecated. 
Constructs an instance of the ranker where the type of importance that is associated with the rank score is the node's importance as an authority.

Parameters:
graph - the graph whose nodes are to be ranked
bias - the weight that should be placed on the root nodes (between 0 and 1)
priors - the set of root nodes

HITSWithPriors

public HITSWithPriors(Graph<V,E> graph,
                      boolean useAuthorityForRanking,
                      double bias,
                      Set<V> priors,
                      String edgeWeightKey)
Deprecated. 
More specialized constructor where the type of importance can be specified.

Parameters:
graph - the graph whose nodes are to be ranked
useAuthorityForRanking -
bias - the weight that should be placed on the root nodes (between 0 and 1)
priors - the set of root nodes
Method Detail

initialize

protected void initialize(Graph<V,E> g,
                          String edgeWeightKeyName)
Deprecated. 

finalizeIterations

protected void finalizeIterations()
Deprecated. 
Description copied from class: RelativeAuthorityRanker
Cleans up all of the prior rank scores on finalize.

Overrides:
finalizeIterations in class RelativeAuthorityRanker<V,E>

getInEdgeWeight

protected double getInEdgeWeight(E e)
Deprecated. 

setInEdgeWeight

protected void setInEdgeWeight(E e,
                               double weight)
Deprecated. 

getRankScoreKey

public String getRankScoreKey()
Deprecated. 
the user datum key used to store the rank scores

Specified by:
getRankScoreKey in class AbstractRanker<V,E>
Returns:
the key

getPreviousAuthorityScore

protected double getPreviousAuthorityScore(V v)
Deprecated. 

getPreviousHubScore

protected double getPreviousHubScore(V v)
Deprecated. 

step

public void step()
Deprecated. 
Description copied from class: IterativeProcess
Evaluate the result of the current iteration.

Specified by:
step in interface IterativeContext
Specified by:
step in class IterativeProcess

setUseAuthorityForRanking

public void setUseAuthorityForRanking(boolean useAuthorityForRanking)
Deprecated. 
If evaluate() has not already been called, the user can override the type of importance. (hub or authority) that should be associated with the rank score.

Parameters:
useAuthorityForRanking - if true, authority is used; if false, hub is used

updateAuthorityRankings

protected void updateAuthorityRankings()
Deprecated. 

updateHubRankings

protected void updateHubRankings()
Deprecated. 

updatePreviousScores

protected void updatePreviousScores()
Deprecated. 


Copyright © 2008 null. All Rights Reserved.