Class AbstractHittingTime<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.MatrixBasedRecommender<U>
es.uam.eps.ir.relison.links.recommendation.algorithms.standalone.randomwalk.AbstractHittingTime<U>
- Type Parameters:
U- type of the users.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)
- 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:
PageRankHittingTime,PersonalizedPageRankHittingTime
public abstract class AbstractHittingTime<U> extends MatrixBasedRecommender<U>
Abstract version of the hitting time algorithm.
-
Field Summary
Fields inherited from class es.uam.eps.ir.relison.links.recommendation.algorithms.MatrixBasedRecommender
libraryFields inherited from class es.uam.eps.ir.relison.links.recommendation.UserFastRankingRecommender
graph -
Constructor Summary
Constructors Constructor Description AbstractHittingTime(FastGraph<U> graph)Constructor.AbstractHittingTime(FastGraph<U> graph, MatrixLibrary library)Constructor. -
Method Summary
Modifier and Type Method Description protected double[][]getCOLTMatrix(int uidx)Obtains the matrix that provides the ratings given the target user, using the COLT library.protected abstract cern.colt.matrix.DoubleMatrix2DgetCOLTTransitionMatrix(int uidx)Obtains the transition matrix, for its use with the COLT library.protected double[][]getJBLASMatrix(int uidx)Obtains the matrix that provides the ratings given the target user, using the JBLAS library.protected abstract org.jblas.DoubleMatrixgetJBLASTransitionMatrix(int uidx)Obtains the transition matrix, for its use with the JBLAS library.protected double[][]getMTJMatrix(int uidx)Obtains the matrix that provides the ratings given the target user, using the MTJ library.protected abstract no.uib.cipr.matrix.DenseMatrixgetMTJTransitionMatrix(int uidx)Obtains the transition matrix, for its use with the MTJ library.Methods inherited from class es.uam.eps.ir.relison.links.recommendation.algorithms.MatrixBasedRecommender
getMatrix, getScoresMapMethods inherited from class es.uam.eps.ir.relison.links.recommendation.UserFastRankingRecommender
getFreq, getFreq, getGraphMethods inherited from class es.uam.eps.ir.ranksys.rec.fast.FastRankingRecommender
getRecommendationMethods inherited from class es.uam.eps.ir.ranksys.rec.fast.AbstractFastRecommender
getRecommendation, getRecommendation, getRecommendation, getRecommendation, getRecommendation, getRecommendation, getRecommendation, iidx2item, item2iidx, numItems, numUsers, uidx2user, user2uidxMethods inherited from class es.uam.eps.ir.ranksys.rec.AbstractRecommender
getRecommendation, getRecommendationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface es.uam.eps.ir.ranksys.fast.index.FastItemIndex
containsItem, getAllIidx, getAllItems, iidx2item, iidx2item, item2iidx, item2iidx
-
Constructor Details
-
AbstractHittingTime
Constructor.- Parameters:
graph- a fast graph representing the social network.
-
AbstractHittingTime
Constructor.- Parameters:
graph- a fast graph representing the social network.library- the matrix library to use.
-
-
Method Details
-
getJBLASMatrix
protected double[][] getJBLASMatrix(int uidx)Description copied from class:MatrixBasedRecommenderObtains the matrix that provides the ratings given the target user, using the JBLAS library.- Specified by:
getJBLASMatrixin classMatrixBasedRecommender<U>- Parameters:
uidx- the target user.- Returns:
- the matrix containing the item scores in the uidx row.
-
getCOLTMatrix
protected double[][] getCOLTMatrix(int uidx)Description copied from class:MatrixBasedRecommenderObtains the matrix that provides the ratings given the target user, using the COLT library.- Specified by:
getCOLTMatrixin classMatrixBasedRecommender<U>- Parameters:
uidx- the target user.- Returns:
- the matrix containing the item scores in the uidx row.
-
getMTJMatrix
protected double[][] getMTJMatrix(int uidx)Description copied from class:MatrixBasedRecommenderObtains the matrix that provides the ratings given the target user, using the MTJ library.- Specified by:
getMTJMatrixin classMatrixBasedRecommender<U>- Parameters:
uidx- the target user.- Returns:
- the matrix containing the item scores in the uidx row.
-
getJBLASTransitionMatrix
protected abstract org.jblas.DoubleMatrix getJBLASTransitionMatrix(int uidx)Obtains the transition matrix, for its use with the JBLAS library.- Parameters:
uidx- the target user of the recommendation.- Returns:
- a JBLAS matrix containing the transitions.
-
getCOLTTransitionMatrix
protected abstract cern.colt.matrix.DoubleMatrix2D getCOLTTransitionMatrix(int uidx)Obtains the transition matrix, for its use with the COLT library.- Parameters:
uidx- the target user of the recommendation.- Returns:
- a COLT matrix containing the transitions.
-
getMTJTransitionMatrix
protected abstract no.uib.cipr.matrix.DenseMatrix getMTJTransitionMatrix(int uidx)Obtains the transition matrix, for its use with the MTJ library.- Parameters:
uidx- the target user of the recommendation.- Returns:
- a MTJ matrix containing the transitions.
-