Class Katz<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.GlobalMatrixBasedRecommender<U>
es.uam.eps.ir.relison.links.recommendation.algorithms.standalone.pathbased.Katz<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 Katz<U> extends GlobalMatrixBasedRecommender<U>
Katz algorithm. This algorithm weights the paths between two users, giving more weight to those at
closer distances.
References:
References:
- L. Katz. A new status index derived from sociometric analysis. Psychometrika 18(1), 39-43 (1953)
- 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 double
b
Dampening factor.private EdgeOrientation
orient
Edge orientation to take.Fields inherited from class es.uam.eps.ir.relison.links.recommendation.algorithms.GlobalMatrixBasedRecommender
matrix
Fields inherited from class es.uam.eps.ir.relison.links.recommendation.algorithms.MatrixBasedRecommender
library
Fields inherited from class es.uam.eps.ir.relison.links.recommendation.UserFastRankingRecommender
graph
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected double[][]
getCOLTMatrix()
Obtains the matrix for the recommendationprotected double[][]
getJBLASMatrix()
Obtains the matrix for the recommendation.protected double[][]
getMTJMatrix()
Obtains the matrix for the recommendationMethods inherited from class es.uam.eps.ir.relison.links.recommendation.algorithms.GlobalMatrixBasedRecommender
getCOLTMatrix, getJBLASMatrix, getMatrix, getMTJMatrix
Methods inherited from class es.uam.eps.ir.relison.links.recommendation.algorithms.MatrixBasedRecommender
getMatrix, getScoresMap
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
-
Constructor Details
-
Katz
Constructor. Uses, by default, the classical orientation (OUT).- Parameters:
graph
- a fast graph representing the social network.b
- the dampening factor.
-
Katz
Constructor.- Parameters:
graph
- a fast graph representing the social network.b
- the dampening factor.orient
- the orientation for the adjacency matrix.
-
-
Method Details
-
getJBLASMatrix
protected double[][] getJBLASMatrix()Obtains the matrix for the recommendation.- Specified by:
getJBLASMatrix
in classGlobalMatrixBasedRecommender<U>
- Returns:
- the matrix for the recommendation.
-
getCOLTMatrix
protected double[][] getCOLTMatrix()Obtains the matrix for the recommendation- Specified by:
getCOLTMatrix
in classGlobalMatrixBasedRecommender<U>
- Returns:
- the matrix for the recommendation
-
getMTJMatrix
protected double[][] getMTJMatrix()Obtains the matrix for the recommendation- Specified by:
getMTJMatrix
in classGlobalMatrixBasedRecommender<U>
- Returns:
- the matrix for the recommendation
-