Class Recall


  • public class Recall
    extends QualityMeasure
    This class calculates the recall of the recommendations performed by a Recommender. It is calculated as follows:

    recall = <relevant recommended items> / <number of relevant items>

    • Constructor Detail

      • Recall

        public Recall​(Recommender recommender,
                      Map<String,​Object> params)
        Constructor from a Map object with the quality measure parameters. Map object must contains the following keys:
        • numberOfRecommendations: int value with the number of items to be recommended.
        • relevantThreshold:: double value with the minimum rating to consider a test rating as relevant.
        Parameters:
        recommender - Recommender instance for which the Recall are going to be computed
        params - Quality measure's parameters
      • Recall

        public Recall​(Recommender recommender,
                      int numberOfRecommendations,
                      double relevantThreshold)
        Constructor
        Parameters:
        recommender - Recommender instance for which the recall are going to be computed
        numberOfRecommendations - Number of recommendations
        relevantThreshold - Minimum rating to consider a rating as relevant
    • Method Detail

      • getScore

        public double getScore​(TestUser testUser,
                               double[] predictions)
        Description copied from class: QualityMeasure
        Computes the quality measure score for a TestUser given the predictions for his/her test ratings
        Specified by:
        getScore in class QualityMeasure
        Parameters:
        testUser - TestUser for which the quality measure score is computed
        predictions - Prediction value for the test items rated by the test user
        Returns:
        Quality measure score