In the one hand, link scoring is the task of computing a value which measures the strength of a particular existing link. On the other hand, link prediction is the task of computing a score, for a pair of nodes, proportional to the likelihood of existence of a link between them. The techniques used for both problems are rather similar, and are based on the idea that the likelihood of two links interacting increases as the number of their shared neighbors does.
## Predicting linksTo perform link prediction using NOESIS, we have to instantiate the link predictor that we want to use. For example, if we want to compute the likelihood of link between a pair of nodes in a given network using random walks, we would write: NodePairMeasureTask predictor = new RandomWalkScore(network);
Now that we have our predictor, we can compute the likelihood of existence of every pair of nodes as follows: Matrix matrix = predictor.call();
The returned square matrix contains the score associated for a pair of nodes according to the considered row and column.
## Scoring linksLinks can be scored using the *LinkScorer *class. The constructor of this class takes the network to which we want to apply the scorer and the particular scores that we want to use. For example, if we want to create a link scorer for a given network using the Katz index we would write the following code: NodePairMeasureTask measure = new KatzScore(network);
LinkScorer scorer = new LinkScorer(network, measure);
Now that we instantiated our scorer, we can compute the score of a link between a pair of nodes with indices 15 and 28 as follows: double score = scorer.compute(15, 28);
## Creating a custom link predictor
## Creating a custom link scorer |