Class HubDepressedIndexLinkPrediction<V,​E>

java.lang.Object
org.jgrapht.alg.linkprediction.HubDepressedIndexLinkPrediction<V,​E>
Type Parameters:
V - the graph vertex type
E - the graph edge type
All Implemented Interfaces:
LinkPredictionAlgorithm<V,​E>

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)
Author:
Dimitrios Michail
  • Constructor Summary

    Constructors 
    Constructor Description
    HubDepressedIndexLinkPrediction​(Graph<V,​E> graph)
    Create a new prediction
  • Method Summary

    Modifier and Type Method Description
    double predict​(V u, V v)
    Predict an edge between two vertices.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.jgrapht.alg.interfaces.LinkPredictionAlgorithm

    predict
  • Constructor Details

  • Method Details

    • 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>
      Parameters:
      u - first vertex
      v - second vertex
      Returns:
      a prediction score