Class UserBasedCFGridSearch<U>

java.lang.Object
es.uam.eps.ir.relison.grid.links.recommendation.algorithms.knn.UserBasedCFGridSearch<U>
Type Parameters:
U - type of the users.
All Implemented Interfaces:
AlgorithmGridSearch<U>

public class UserBasedCFGridSearch<U>
extends java.lang.Object
implements AlgorithmGridSearch<U>
Grid search generator for user-based kNN collaborative filtering algorithm.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private static java.lang.String K
    Identifier for the number of neighbors of the algorithm.
    private static java.lang.String Q
    Exponent of the similarity.
    private static java.lang.String SIM
    Identifier for the similarity.
    private org.ranksys.formats.parsing.Parser<U> uParser
    A parser for reading users.
    private static java.lang.String WEIGHTED
    Identifier for indicating whether the result is weighted or not.
  • Constructor Summary

    Constructors 
    Constructor Description
    UserBasedCFGridSearch​(org.ranksys.formats.parsing.Parser<U> uParser)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    java.util.Map<java.lang.String,​RecommendationAlgorithmFunction<U>> grid​(Grid grid)
    Obtains the different recommendation algorithms to execute in a grid.
    java.util.Map<java.lang.String,​java.util.function.Supplier<es.uam.eps.ir.ranksys.rec.Recommender<U,​U>>> grid​(Grid grid, FastGraph<U> graph, es.uam.eps.ir.ranksys.fast.preference.FastPreferenceData<U,​U> prefData)
    Obtains the different recommendation algorithms to execute in a grid.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • K

      private static final java.lang.String K
      Identifier for the number of neighbors of the algorithm.
      See Also:
      Constant Field Values
    • SIM

      private static final java.lang.String SIM
      Identifier for the similarity.
      See Also:
      Constant Field Values
    • Q

      private static final java.lang.String Q
      Exponent of the similarity.
      See Also:
      Constant Field Values
    • WEIGHTED

      private static final java.lang.String WEIGHTED
      Identifier for indicating whether the result is weighted or not.
      See Also:
      Constant Field Values
    • uParser

      private final org.ranksys.formats.parsing.Parser<U> uParser
      A parser for reading users.
  • Constructor Details

    • UserBasedCFGridSearch

      public UserBasedCFGridSearch​(org.ranksys.formats.parsing.Parser<U> uParser)
      Constructor.
      Parameters:
      uParser - user parser.
  • Method Details

    • grid

      public java.util.Map<java.lang.String,​java.util.function.Supplier<es.uam.eps.ir.ranksys.rec.Recommender<U,​U>>> grid​(Grid grid, FastGraph<U> graph, es.uam.eps.ir.ranksys.fast.preference.FastPreferenceData<U,​U> prefData)
      Description copied from interface: AlgorithmGridSearch
      Obtains the different recommendation algorithms to execute in a grid.
      Specified by:
      grid in interface AlgorithmGridSearch<U>
      Parameters:
      grid - The grid for the algorithm.
      graph - The training graph.
      prefData - The preference training data.
      Returns:
      a map containing the different recommendations.
    • grid

      public java.util.Map<java.lang.String,​RecommendationAlgorithmFunction<U>> grid​(Grid grid)
      Description copied from interface: AlgorithmGridSearch
      Obtains the different recommendation algorithms to execute in a grid.
      Specified by:
      grid in interface AlgorithmGridSearch<U>
      Parameters:
      grid - The grid for the algorithm.
      Returns:
      a map containing the different recommendations.