|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.llnl.ontology.wordnet.SynsetPagerank
public class SynsetPagerank
This class performs PageRank over a graph of Synsets. Synsets are assumed to be connected with an arbitrary set of directional
links. Each Synset will be given a single score that rates it's
importance in the graph.
Synset is given a set of transition probabilities. Each
outgoing link from a Synset is assumed to have equal weight. These
transition probabilities are stored as an Attribute in the Synset. Calling setupTransitionAttributes will create these
Attributes for each Synset. If there is a core subgraph
that is held constant through multiple Page Rank runs, it is suggested
that this core subgraph is stored in a separate list and setupTransitionAttributes be called once on this subgraph. Attributes through setTransitionAttribute. Synset in
the graph is only given a set of transition probabilities. As long as the
link structure is held constant, there is no need to setup new transition
probabilities for the core graph.
| Field Summary | |
|---|---|
static String |
TRANSITION_ATTRIBUTE
The identifier for an Attribute of transition probabilities. |
| Constructor Summary | |
|---|---|
SynsetPagerank()
|
|
| Method Summary | |
|---|---|
static edu.ucla.sspace.vector.SparseDoubleVector |
computePageRank(List<Synset> synsetList,
edu.ucla.sspace.vector.SparseDoubleVector sourceWeights,
double weight)
Returns a SparseDoubleVector representing the page rank scores of
each synset in synsetList. |
static void |
setTransitionAttribute(Synset synset,
Map<Synset,Integer> synsetMap)
Create a Attribute for the transition probabilities of the given
Synset. |
static void |
setupTransitionAttributes(List<Synset> synsetList,
Map<Synset,Integer> synsetMap)
Adds transition probability Attributes for each Synset in
synsetList. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TRANSITION_ATTRIBUTE
Attribute of transition probabilities.
These Attributes will simply be SparseDoubleVectors.
| Constructor Detail |
|---|
public SynsetPagerank()
| Method Detail |
|---|
public static void setTransitionAttribute(Synset synset,
Map<Synset,Integer> synsetMap)
Attribute for the transition probabilities of the given
Synset. Each connection is given an even weight. synsetMap provides the desired indices for each possible Synset.
synset - The synset for which transition probability transtions will
be addedsynsetMap - A mapping from Sysnets to a vector indices
NullPointerException - if synsetMap does not contain a
mapping for an outward link in synset
public static void setupTransitionAttributes(List<Synset> synsetList,
Map<Synset,Integer> synsetMap)
Attributes for each Synset in
synsetList. The indices for outward links are specified by
synsetMap.
synset - The list of synsets for which transition probability
transtions will be addedsynsetMap - A mapping from Sysnets to a vector indices
NullPointerException - if synsetMap does not contain a
mapping for an outward link in any Synset
public static edu.ucla.sspace.vector.SparseDoubleVector computePageRank(List<Synset> synsetList,
edu.ucla.sspace.vector.SparseDoubleVector sourceWeights,
double weight)
SparseDoubleVector representing the page rank scores of
each synset in synsetList. Each Synset is assumed to
have a SparseDoubleVector Attribute representing the
transition probabilities, which can be setup by calling setupTransitionAttributes. Altogether, these transition vectors form
the transition matrix needed in the PageRank computation. Note that if
one sets the sourceWeights carefully, a customized page rank can
be computed. It is recomended that a small number of values in sourceWeights be set to a non zero value if synsetList contains
a large number of Synsets from the original word net graph.
synsetList - The set of Sysnets over which to compute page
rank scoressourceWeights - A vector of teleporation probabilities, i.e., the
probability that a random surfer lands at a particular synset
given that a random jump was madeweight - The probability of making a random jump at any point in
time
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||