Class CommuteTime<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.randomwalk.CommuteTime<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>
public class CommuteTime<U> extends UserFastRankingRecommender<U>
Commute time algorithm. It is computed as the hitting time between the target user
and the candidate user plus the time needed to do the backwards path.
Reference: D. Liben-Nowell, D., J. Kleinberg. The Link Prediction Problem for Social Networks. Journal of the American Society for Information Science and Technology 58(7) (2007)
-
Field Summary
Fields Modifier and Type Field Description private AbstractHittingTime<U>
hittingTime
A hitting time implementation.Fields inherited from class es.uam.eps.ir.relison.links.recommendation.UserFastRankingRecommender
graph
-
Constructor Summary
Constructors Constructor Description CommuteTime(FastGraph<U> graph, AbstractHittingTime<U> hittingTime)
Constructor. -
Method Summary
Modifier and Type Method Description it.unimi.dsi.fastutil.ints.Int2DoubleMap
getScoresMap(int uidx)
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
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
-
hittingTime
A hitting time implementation.
-
-
Constructor Details
-
CommuteTime
Constructor.- Parameters:
graph
- a fast graph representing the social network.hittingTime
- the hitting time algorithm to use.
-
-
Method Details
-
getScoresMap
public it.unimi.dsi.fastutil.ints.Int2DoubleMap getScoresMap(int uidx)
-