Class ScoringUtils
java.lang.Object
edu.uci.ics.jung.algorithms.scoring.util.ScoringUtils
Methods for assigning values (to be interpreted as prior probabilities) to vertices in the context
of random-walk-based scoring algorithms.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <V> com.google.common.base.Function
<V, HITS.Scores> getHITSUniformRootPrior
(Collection<V> roots) Returns a Function that hub and authority values of 1/roots.size()
to each element ofroots
.static <V> com.google.common.base.Function
<V, Double> getUniformRootPrior
(Collection<V> roots) Assigns a probability of 1/roots.size()
to each of the elements ofroots
.
-
Constructor Details
-
ScoringUtils
public ScoringUtils()
-
-
Method Details
-
getUniformRootPrior
public static <V> com.google.common.base.Function<V,Double> getUniformRootPrior(Collection<V> roots) Assigns a probability of 1/roots.size()
to each of the elements ofroots
.- Type Parameters:
V
- the vertex type- Parameters:
roots
- the vertices to be assigned nonzero prior probabilities- Returns:
- a Function assigning a uniform prior to each element in
roots
-
getHITSUniformRootPrior
public static <V> com.google.common.base.Function<V,HITS.Scores> getHITSUniformRootPrior(Collection<V> roots) Returns a Function that hub and authority values of 1/roots.size()
to each element ofroots
.- Type Parameters:
V
- the vertex type- Parameters:
roots
- the vertices to be assigned nonzero scores- Returns:
- a Function that assigns uniform prior hub/authority probabilities to each root
-