Class GlobalMatrixBasedRecommender<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>
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:
GlobalLHNIndex, Katz, LocalPathIndex, MatrixForest, PseudoInverseCosine

public abstract class GlobalMatrixBasedRecommender<U>
extends MatrixBasedRecommender<U>
Contact recommendation algorithm that on operations over a global matrix.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected double[][] matrix
    The 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

    Fields inherited from class es.uam.eps.ir.ranksys.rec.fast.AbstractFastRecommender

    iIndex, uIndex
  • Constructor Summary

    Constructors 
    Constructor Description
    GlobalMatrixBasedRecommender​(FastGraph<U> graph)
    Constructor.
    GlobalMatrixBasedRecommender​(FastGraph<U> graph, MatrixLibrary library)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    protected abstract double[][] getCOLTMatrix()
    Obtains the matrix using the COLT library.
    protected double[][] getCOLTMatrix​(int uidx)
    Obtains the matrix that provides the ratings given the target user, using the COLT library.
    protected abstract double[][] getJBLASMatrix()
    Obtains the matrix using the JBLAS library.
    protected double[][] getJBLASMatrix​(int uidx)
    Obtains the matrix that provides the ratings given the target user, using the JBLAS library.
    protected double[][] getMatrix()
    Obtains the unique matrix for the system.
    protected abstract double[][] getMTJMatrix()
    Obtains the matrix using the MTJ library.
    protected double[][] getMTJMatrix​(int uidx)
    Obtains the matrix that provides the ratings given the target user, using the MTJ library.

    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

    Methods inherited from interface es.uam.eps.ir.ranksys.fast.index.FastUserIndex

    containsUser, getAllUidx, getAllUsers, uidx2user, uidx2user, user2uidx, user2uidx

    Methods inherited from interface es.uam.eps.ir.ranksys.rec.Recommender

    getRecommendation, getRecommendation
  • Field Details

    • matrix

      protected double[][] matrix
      The matrix.
  • Constructor Details

  • Method Details

    • getMatrix

      protected double[][] getMatrix()
      Obtains the unique matrix for the system.
      Returns:
      the matrix.
    • getJBLASMatrix

      protected abstract double[][] getJBLASMatrix()
      Obtains the matrix using the JBLAS library.
      Returns:
      the matrix.
    • getCOLTMatrix

      protected abstract double[][] getCOLTMatrix()
      Obtains the matrix using the COLT library.
      Returns:
      the matrix.
    • getMTJMatrix

      protected abstract double[][] getMTJMatrix()
      Obtains the matrix using the MTJ library.
      Returns:
      the matrix.
    • getCOLTMatrix

      protected double[][] getCOLTMatrix​(int uidx)
      Description copied from class: MatrixBasedRecommender
      Obtains the matrix that provides the ratings given the target user, using the COLT library.
      Specified by:
      getCOLTMatrix in class MatrixBasedRecommender<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: MatrixBasedRecommender
      Obtains the matrix that provides the ratings given the target user, using the MTJ library.
      Specified by:
      getMTJMatrix in class MatrixBasedRecommender<U>
      Parameters:
      uidx - the target user.
      Returns:
      the matrix containing the item scores in the uidx row.
    • getJBLASMatrix

      protected double[][] getJBLASMatrix​(int uidx)
      Description copied from class: MatrixBasedRecommender
      Obtains the matrix that provides the ratings given the target user, using the JBLAS library.
      Specified by:
      getJBLASMatrix in class MatrixBasedRecommender<U>
      Parameters:
      uidx - the target user.
      Returns:
      the matrix containing the item scores in the uidx row.