edu.uci.ics.jung.algorithms.scoring
Class AbstractIterativeScorerWithPriors<V,E,S>

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.scoring.AbstractIterativeScorer<V,E,S>
      extended by edu.uci.ics.jung.algorithms.scoring.AbstractIterativeScorerWithPriors<V,E,S>
Type Parameters:
V - the vertex type
E - the edge type
S - the score type
All Implemented Interfaces:
VertexScorer<V,S>, IterativeContext
Direct Known Subclasses:
HITSWithPriors, PageRankWithPriors

public abstract class AbstractIterativeScorerWithPriors<V,E,S>
extends AbstractIterativeScorer<V,E,S>
implements VertexScorer<V,S>

An abstract class for iterative random-walk-based vertex scoring algorithms that have a fixed probability, for each vertex, of 'jumping' to that vertex at each step in the algorithm (rather than following a link out of that vertex).


Field Summary
protected  double alpha
          The probability of making a 'jump' at each step.
protected  org.apache.commons.collections15.Transformer<V,? extends S> vertex_priors
          The prior probability of each vertex being visited on a given 'jump' (non-link-following) step.
 
Fields inherited from class edu.uci.ics.jung.algorithms.scoring.AbstractIterativeScorer
edge_weights, graph, hyperedges_are_self_loops, max_delta, max_iterations, output_reversed, tolerance, total_iterations
 
Constructor Summary
AbstractIterativeScorerWithPriors(Hypergraph<V,E> g, org.apache.commons.collections15.Transformer<E,? extends Number> edge_weights, org.apache.commons.collections15.Transformer<V,? extends S> vertex_priors, double alpha)
          Creates an instance for the specified graph, edge weights, vertex priors, and jump probability.
AbstractIterativeScorerWithPriors(Hypergraph<V,E> g, org.apache.commons.collections15.Transformer<V,? extends S> vertex_priors, double alpha)
          Creates an instance for the specified graph, vertex priors, and jump probability, with edge weights specified by the subclass.
 
Method Summary
 double getAlpha()
          Returns the probability of making a 'jump' (non-link-following step).
protected  S getVertexPrior(V v)
          Returns the prior probability for v.
 org.apache.commons.collections15.Transformer<V,? extends S> getVertexPriors()
          Returns a Transformer which maps each vertex to its prior probability.
 void initialize()
          Initializes the state of this instance.
 
Methods inherited from class edu.uci.ics.jung.algorithms.scoring.AbstractIterativeScorer
acceptDisconnectedGraph, afterStep, collectDisappearingPotential, done, evaluate, getAdjustedIncidentCount, getCurrentValue, getEdgeWeight, getEdgeWeights, getIterations, getMaxIterations, getOutputValue, getTolerance, getVertexScore, isDisconnectedGraphOK, setCurrentValue, setEdgeWeights, setHyperedgesAreSelfLoops, setMaxIterations, setOutputValue, setTolerance, step, swapOutputForCurrent, update, updateMaxDelta
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.uci.ics.jung.algorithms.scoring.VertexScorer
getVertexScore
 

Field Detail

vertex_priors

protected org.apache.commons.collections15.Transformer<V,? extends S> vertex_priors
The prior probability of each vertex being visited on a given 'jump' (non-link-following) step.


alpha

protected double alpha
The probability of making a 'jump' at each step.

Constructor Detail

AbstractIterativeScorerWithPriors

public AbstractIterativeScorerWithPriors(Hypergraph<V,E> g,
                                         org.apache.commons.collections15.Transformer<E,? extends Number> edge_weights,
                                         org.apache.commons.collections15.Transformer<V,? extends S> vertex_priors,
                                         double alpha)
Creates an instance for the specified graph, edge weights, vertex priors, and jump probability.

Parameters:
g - the graph whose vertices are to be assigned scores
edge_weights - the edge weights to use in the score assignment
vertex_priors - the prior probabilities of each vertex being 'jumped' to
alpha - the probability of making a 'jump' at each step

AbstractIterativeScorerWithPriors

public AbstractIterativeScorerWithPriors(Hypergraph<V,E> g,
                                         org.apache.commons.collections15.Transformer<V,? extends S> vertex_priors,
                                         double alpha)
Creates an instance for the specified graph, vertex priors, and jump probability, with edge weights specified by the subclass.

Parameters:
g - the graph whose vertices are to be assigned scores
vertex_priors - the prior probabilities of each vertex being 'jumped' to
alpha - the probability of making a 'jump' at each step
Method Detail

initialize

public void initialize()
Initializes the state of this instance.

Overrides:
initialize in class AbstractIterativeScorer<V,E,S>

getVertexPrior

protected S getVertexPrior(V v)
Returns the prior probability for v.

Parameters:
v - the vertex whose prior probability is being queried
Returns:
the prior probability for v

getVertexPriors

public org.apache.commons.collections15.Transformer<V,? extends S> getVertexPriors()
Returns a Transformer which maps each vertex to its prior probability.

Returns:
a Transformer which maps each vertex to its prior probability

getAlpha

public double getAlpha()
Returns the probability of making a 'jump' (non-link-following step).

Returns:
the probability of making a 'jump' (non-link-following step)


Copyright © 2009. All Rights Reserved.