Class BipartiteRecommender<U>
java.lang.Object
es.uam.eps.ir.ranksys.rec.AbstractRecommender<U,I>
es.uam.eps.ir.ranksys.rec.fast.AbstractFastRecommender<U,I>
es.uam.eps.ir.ranksys.rec.fast.FastRankingRecommender<U,U>
es.uam.eps.ir.relison.links.recommendation.UserFastRankingRecommender<U>
es.uam.eps.ir.relison.links.recommendation.algorithms.standalone.bipartite.BipartiteRecommender<U>
- Type Parameters:
U
- type of the users.
- All Implemented Interfaces:
es.uam.eps.ir.ranksys.core.index.ItemIndex<U>
,es.uam.eps.ir.ranksys.core.index.UserIndex<U>
,es.uam.eps.ir.ranksys.fast.index.FastItemIndex<U>
,es.uam.eps.ir.ranksys.fast.index.FastUserIndex<U>
,es.uam.eps.ir.ranksys.rec.fast.FastRecommender<U,U>
,es.uam.eps.ir.ranksys.rec.Recommender<U,U>
- Direct Known Subclasses:
AverageCosineSimilarity
,CentroidCosineSimilarity
,HITS
,MaximumCosineSimilarity
,PersonalizedHITS
,PersonalizedSALSA
public abstract class BipartiteRecommender<U> extends UserFastRankingRecommender<U>
Abstract class which represents a bipartite recommender. In those recommenders, there are two types
of users: authorities and hubs. Hubs only have outgoing links, and authorities only have incoming links.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Long,U>
authorities
A map between the authorities identifiers and their true representation (the node in the original graph).protected DirectedGraph<java.lang.Long>
bipartiteGraph
The bipartite representation of the graph.protected java.util.Map<java.lang.Long,U>
hubs
A map between the hubs identifiers and their true representation (the node in the original graph).protected boolean
mode
Execution mode: true if we want to recommend authorities, false if not.Fields inherited from class es.uam.eps.ir.relison.links.recommendation.UserFastRankingRecommender
graph
-
Constructor Summary
Constructors Constructor Description BipartiteRecommender(FastGraph<U> graph, boolean mode)
Constructor. -
Method Summary
Modifier and Type Method Description private DirectedGraph<java.lang.Long>
computeBipartiteGraph()
Computes the bipartite graph from the original network.Methods inherited from class es.uam.eps.ir.relison.links.recommendation.UserFastRankingRecommender
getFreq, getFreq, getGraph
Methods inherited from class es.uam.eps.ir.ranksys.rec.fast.FastRankingRecommender
getRecommendation, getScoresMap
Methods inherited from class es.uam.eps.ir.ranksys.rec.fast.AbstractFastRecommender
getRecommendation, getRecommendation, getRecommendation, getRecommendation, getRecommendation, getRecommendation, getRecommendation, iidx2item, item2iidx, numItems, numUsers, uidx2user, user2uidx
Methods inherited from class es.uam.eps.ir.ranksys.rec.AbstractRecommender
getRecommendation, getRecommendation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface es.uam.eps.ir.ranksys.fast.index.FastItemIndex
containsItem, getAllIidx, getAllItems, iidx2item, iidx2item, item2iidx, item2iidx
-
Field Details
-
mode
protected final boolean modeExecution mode: true if we want to recommend authorities, false if not. -
hubs
A map between the hubs identifiers and their true representation (the node in the original graph). -
authorities
A map between the authorities identifiers and their true representation (the node in the original graph). -
bipartiteGraph
The bipartite representation of the graph.
-
-
Constructor Details
-
BipartiteRecommender
Constructor.- Parameters:
graph
- the graph.mode
- true if we want to recommend authorities, false if we want to recommmend hubs.
-
-
Method Details
-
computeBipartiteGraph
Computes the bipartite graph from the original network.- Returns:
- the bipartite graph.
-