Class RecommenderSimilarity
java.lang.Object
es.uam.eps.ir.relison.links.recommendation.algorithms.knn.similarities.GraphSimilarity
es.uam.eps.ir.relison.links.recommendation.algorithms.knn.similarities.RecommenderSimilarity
- All Implemented Interfaces:
es.uam.eps.ir.ranksys.nn.sim.Similarity
public class RecommenderSimilarity extends GraphSimilarity
Class which applies any contact recommendation algorithm as a graph
similarity for contact recommendation / link prediction.
-
Field Summary
Fields Modifier and Type Field Description private es.uam.eps.ir.ranksys.rec.fast.FastRecommender<?,?>
recommender
A fast recommendation algorithm.Fields inherited from class es.uam.eps.ir.relison.links.recommendation.algorithms.knn.similarities.GraphSimilarity
graph
-
Constructor Summary
Constructors Constructor Description RecommenderSimilarity(FastGraph<?> graph, es.uam.eps.ir.ranksys.rec.fast.FastRecommender<?,?> recommender)
Constructor. -
Method Summary
Modifier and Type Method Description java.util.stream.Stream<org.ranksys.core.util.tuples.Tuple2id>
similarElems(int uidx)
java.util.function.IntToDoubleFunction
similarity(int uidx)
-
Field Details
-
recommender
private final es.uam.eps.ir.ranksys.rec.fast.FastRecommender<?,?> recommenderA fast recommendation algorithm.
-
-
Constructor Details
-
RecommenderSimilarity
public RecommenderSimilarity(FastGraph<?> graph, es.uam.eps.ir.ranksys.rec.fast.FastRecommender<?,?> recommender)Constructor.- Parameters:
graph
- the social network graph.recommender
- the recommendation algorithm to use as similarity.
-
-
Method Details
-
similarity
public java.util.function.IntToDoubleFunction similarity(int uidx) -
similarElems
public java.util.stream.Stream<org.ranksys.core.util.tuples.Tuple2id> similarElems(int uidx)
-