Class UserFastRankingRecommender<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>
- 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:
AdamicAdar
,BipartiteRecommender
,BM25
,CentroidCBRecommender
,Closure
,CommuteTime
,Cosine
,Dist2Popularity
,HubDepressedIndex
,HubPromotedIndex
,Jaccard
,LambdaMARTJForestsRecommender
,LambdaMARTRecommender
,LocalLHNIndex
,MachineLearningRecommender
,MachineLearningWekaRecommender
,MatrixBasedRecommender
,MostCommonNeighbors
,NonReciprocalPreferentialAttachment
,PageRank
,PersonalizedPageRank
,PivotedNormalizationVSM
,Popularity
,PreferentialAttachment
,PropFlow
,PurePersonalizedPageRank
,QLD
,QLJM
,QLL
,Random
,ReciprocalLinks
,ResourceAllocation
,SALSA
,ShortestDistance
,Sorensen
,TerrierRecommender
,TotalNeighbors
,TwitterRecommender
,TwittomenderRecommender
,UserFastRankingUpdateableRecommender
,VSM
public abstract class UserFastRankingRecommender<U>
extends es.uam.eps.ir.ranksys.rec.fast.FastRankingRecommender<U,U>
Abstract class for user recommendation in social networks.
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description UserFastRankingRecommender(FastGraph<U> graph)
Constructor.private
UserFastRankingRecommender(FastGraph<U> graph, GraphIndex<U> index)
Private constructor. -
Method Summary
Modifier and Type Method Description protected double
getFreq(int uidx, int vidx, EdgeOrientation orient)
Obtains the weight of an edge.protected double
getFreq(U u, U v, EdgeOrientation orient)
Obtains the weight of an edge.FastGraph<U>
getGraph()
Obtains the graph.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
-
graph
The graph which represents the social network relations.
-
-
Constructor Details
-
UserFastRankingRecommender
Constructor.- Parameters:
graph
- a fast graph representing the social network.
-
UserFastRankingRecommender
Private constructor. Receives an index, in addition to a graph- Parameters:
graph
- a fast graph representing the social network.index
- the user index of the graph.
-
-
Method Details
-
getGraph
Obtains the graph.- Returns:
- the graph.
-
getFreq
Obtains the weight of an edge.- Parameters:
u
- the first nodev
- the second nodeorient
- the orientation.- Returns:
- the weight. In case of UND edge orientation, we take the sum of both possible weights (if the graph is weighted), or 1.0 if any of them exists (if the graph is unweighted).
-
getFreq
Obtains the weight of an edge.- Parameters:
uidx
- the first node identifiervidx
- the second node identifierorient
- the orientation.- Returns:
- the weight. In case of UND edge orientation, we take the sum of both possible weights (if the graph is weighted), or 1.0 if any of them exists (if the graph is unweighted).
-