Class HubDepressedIndexLinkPrediction<V,​E>

  • Type Parameters:
    V - the graph vertex type
    E - the graph edge type
    All Implemented Interfaces:

    public class HubDepressedIndexLinkPrediction<V,​E>
    extends java.lang.Object
    implements LinkPredictionAlgorithm<V,​E>
    Predict links using the Hub Depressed Index.

    This is a local method which computes $s_{xy} = \frac{2|\Gamma(u)\cap\Gamma(v))|}{max(k(u),k(v))}$ where for a node $v$, $\Gamma(v)$ denotes the set of neighbors of $v$ and $k(v) = |\Gamma(v)|$ denotes the degree of $v$.

    See the following paper:
    • E. Ravasz, A.L. Somera, D.A. Mongru, Z.N. Oltvai, A.-L. Barab├ísi, Science 297, 1553 (2002)
    Dimitrios Michail
    • Constructor Detail

      • HubDepressedIndexLinkPrediction

        public HubDepressedIndexLinkPrediction​(Graph<V,​E> graph)
        Create a new prediction
        graph - the input graph
    • Method Detail

      • predict

        public double predict​(V u,
                              V v)
        Description copied from interface: LinkPredictionAlgorithm
        Predict an edge between two vertices. The magnitude and the interpretation of the returned score depend solely on the algorithm.
        Specified by:
        predict in interface LinkPredictionAlgorithm<V,​E>
        u - first vertex
        v - second vertex
        a prediction score