Interface LinkPredictor<U>
- Type Parameters:
U- type of the users.
- All Known Implementing Classes:
AbstractLinkPredictor,InstancePostfixExLinkPredictor,RecommendationLinkPredictor,SupervisedLinkPredictor
public interface LinkPredictor<U>
Definition of a method that predicts a collection of links which are likely
to appear in a social network in the future.
-
Method Summary
Modifier and Type Method Description Prediction<U>getPrediction()Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm.Prediction<U>getPrediction(int maxLength)Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm and returns the a limited set of them.Prediction<U>getPrediction(int maxLength, java.util.function.Predicate<Pair<U>> filter)Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm.Prediction<U>getPrediction(java.util.function.Predicate<Pair<U>> filter)Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm.Prediction<U>getPrediction(java.util.stream.Stream<Pair<U>> candidates)Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm.doublegetPredictionScore(U u, U v)Obtains the prediction score for a pair of candidates.
-
Method Details
-
getPrediction
Prediction<U> getPrediction()Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm.- Returns:
- a sorted list containing the user-user pairs and the link prediction score (in descending score order).
-
getPrediction
Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm and returns the a limited set of them.- Parameters:
maxLength- the maximum size of the link prediction list.- Returns:
- a sorted list containing the user-user pairs and the link prediction score (in descending score order).
-
getPrediction
Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm. It only ranks those user pairs which pass a given filter.- Parameters:
filter- a filter to indicate which user pairs shall be ranked.- Returns:
- a sorted list containing the user-user pairs and the link prediction score (in descending score order).
-
getPrediction
Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm. It only ranks those user pairs which pass a given filter. It returns a limited number of such pairs.- Parameters:
filter- a filter to indicate which user pairs shall be ranked.maxLength- the maximum size of the link prediction list.- Returns:
- a sorted list containing the user-user pairs and the link prediction score (in descending score order).
-
getPrediction
Given a social network, ranks the possible user-user pairs, according to the scores given by the algorithm. It only ranks the received user pairs.- Parameters:
candidates- a stream containing the user pairs to rank.- Returns:
- a sorted list containing the user-user pairs and the link prediction score (in descending score order).
-
getPredictionScore
Obtains the prediction score for a pair of candidates.- Parameters:
u- first user in the pair.v- second user in the pair.- Returns:
- the prediction score.
-