Esempio n. 1
0
        private void AddRecommender <TUserRatings>(int userId, TUserRatings ratings, IUserInputClassifier <TUserRatings> recommenderRatingClassifier)
            where TUserRatings : IInputForUserWithItemIds
        {
            ClassifiedUserInput <TUserRatings> classifiedRatings = recommenderRatingClassifier.Classify(ratings);

            List <int>  recs        = new List <int>(classifiedRatings.Liked.ItemIds);
            Recommender recommender = new Recommender(userId, recs);

            Recommenders.Add(recommender);
        }
Esempio n. 2
0
 public AnimeRecsInput(TUnderlyingInput originalInput, ClassifiedUserInput <TUnderlyingInput> classifiedInput,
                       Comparison <Tuple <int, int> > orderingGivenRecommenderAndItemIds)
 {
     OriginalInput   = originalInput;
     ClassifiedInput = classifiedInput;
     OrderingGivenRecommenderAndItemIds = orderingGivenRecommenderAndItemIds;
     if (orderingGivenRecommenderAndItemIds != null)
     {
         OrderingGivenRecommenderAndItemIdsComparable = new DelegateComparer <Tuple <int, int> >(orderingGivenRecommenderAndItemIds);
     }
 }