Class PurePersonalizedPageRank<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.PurePersonalizedPageRank<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 PurePersonalizedPageRank<U> extends UserFastRankingRecommender<U>
Recommender algorithm based in a modified Personalized PageRank.
- 
Field SummaryFields Modifier and Type Field Description private doublelambdaThe teleport rateprivate static intMAXITERMaximum number of iterations.private booleanS2UIndicates if teleports always go to the origin node.private booleansimpleIn case it is true, the target node (or root/origin node) can only be accessed via teleport by a random walker.private static doubleTHRESHOLDConvergence threshold.Fields inherited from class es.uam.eps.ir.relison.links.recommendation.UserFastRankingRecommendergraph
- 
Constructor SummaryConstructors Constructor Description PurePersonalizedPageRank(FastGraph<U> graph, double lambda, boolean simple, boolean S2U)Constructor
- 
Method SummaryModifier and Type Method Description protected java.util.Map<U,java.lang.Double>calculatePagerank(U uId)Calculates the PageRank valueit.unimi.dsi.fastutil.ints.Int2DoubleMapgetScoresMap(int i)Methods inherited from class es.uam.eps.ir.relison.links.recommendation.UserFastRankingRecommendergetFreq, getFreq, getGraphMethods inherited from class es.uam.eps.ir.ranksys.rec.fast.FastRankingRecommendergetRecommendationMethods inherited from class es.uam.eps.ir.ranksys.rec.fast.AbstractFastRecommendergetRecommendation, getRecommendation, getRecommendation, getRecommendation, getRecommendation, getRecommendation, getRecommendation, iidx2item, item2iidx, numItems, numUsers, uidx2user, user2uidxMethods inherited from class es.uam.eps.ir.ranksys.rec.AbstractRecommendergetRecommendation, getRecommendationMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface es.uam.eps.ir.ranksys.fast.index.FastItemIndexcontainsItem, getAllIidx, getAllItems, iidx2item, iidx2item, item2iidx, item2iidx
- 
Field Details- 
simpleprivate final boolean simpleIn case it is true, the target node (or root/origin node) can only be accessed via teleport by a random walker. In other case, with some probability, the node can be accessed by its incoming neighbors.
- 
S2Uprivate final boolean S2UIndicates if teleports always go to the origin node. In case it is false, when the random walker arrives to a sink, it might teleport to the any of the other nodes.
- 
lambdaprivate final double lambdaThe teleport rate
- 
THRESHOLDprivate static final double THRESHOLDConvergence threshold.- See Also:
- Constant Field Values
 
- 
MAXITERprivate static final int MAXITERMaximum number of iterations.- See Also:
- Constant Field Values
 
 
- 
- 
Constructor Details- 
PurePersonalizedPageRankConstructor- Parameters:
- graph- the original graph.
- lambda- the teleport rate.
- simple- indicates if the target node can only be accessed via teleport or not.
- S2U- Indicates if teleports always go to the origin node.
 
 
- 
- 
Method Details- 
getScoresMappublic it.unimi.dsi.fastutil.ints.Int2DoubleMap getScoresMap(int i)
- 
calculatePagerankCalculates the PageRank value- Parameters:
- uId- root node.
- Returns:
- The PageRank value for all the nodes.
 
 
-