Class ScoringUtils


  • public class ScoringUtils
    extends java.lang.Object
    Methods for assigning values (to be interpreted as prior probabilities) to vertices in the context of random-walk-based scoring algorithms.
    • Constructor Summary

      Constructors 
      Constructor Description
      ScoringUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <V> org.apache.commons.collections4.Transformer<V,​HITS.Scores> getHITSUniformRootPrior​(java.util.Collection<V> roots)
      Returns a Transformer that hub and authority values of 1/roots.size() to each element of roots.
      static <V> org.apache.commons.collections4.Transformer<V,​java.lang.Double> getUniformRootPrior​(java.util.Collection<V> roots)
      Assigns a probability of 1/roots.size() to each of the elements of roots.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScoringUtils

        public ScoringUtils()
    • Method Detail

      • getUniformRootPrior

        public static <V> org.apache.commons.collections4.Transformer<V,​java.lang.Double> getUniformRootPrior​(java.util.Collection<V> roots)
        Assigns a probability of 1/roots.size() to each of the elements of roots.
        Type Parameters:
        V - the vertex type
        Parameters:
        roots - the vertices to be assigned nonzero prior probabilities
        Returns:
      • getHITSUniformRootPrior

        public static <V> org.apache.commons.collections4.Transformer<V,​HITS.Scores> getHITSUniformRootPrior​(java.util.Collection<V> roots)
        Returns a Transformer that hub and authority values of 1/roots.size() to each element of roots.
        Type Parameters:
        V - the vertex type
        Parameters:
        roots - the vertices to be assigned nonzero scores
        Returns:
        a Transformer that assigns uniform prior hub/authority probabilities to each root