Module org.jgrapht.core
Package org.jgrapht.alg.linkprediction
Class HubPromotedIndexLinkPrediction<V,E>
java.lang.Object
org.jgrapht.alg.linkprediction.HubPromotedIndexLinkPrediction<V,E>
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
LinkPredictionAlgorithm<V,
E>
public class HubPromotedIndexLinkPrediction<V,E>
extends Object
implements LinkPredictionAlgorithm<V,E>
Predict links using the Hub Promoted Index.
This is a local method which computes $s_{xy} = \frac{2|\Gamma(u)\cap\Gamma(v))|}{min(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 Details
-
HubPromotedIndexLinkPrediction
Create a new prediction- Parameters:
graph
- the input graph
-
-
Method Details
-
predict
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 interfaceLinkPredictionAlgorithm<V,
E> - Parameters:
u
- first vertexv
- second vertex- Returns:
- a prediction score
-