Python Implementation of Recommendation Algorithms for Rating Prediction and Item Recommendation

Python Implementation of Recommendation Algorithms for Rating Prediction and Item Recommendation
Slide Note
Embed
Share

This Python library, CaseRecommender, provides implementations of various recommendation algorithms supporting rating prediction and item recommendation scenarios. It includes algorithms like ItemKNN, Matrix Factorization with BPR, UserKNN for item recommendation and Matrix Factorization, SVD, Item Attribute KNN, UserKNN for rating prediction. The library offers easy usage through dataset splitting, running scenarios like Item Recommendation and Rating Prediction, and evaluating results. It is a valuable tool for evaluating and comparing different recommendation algorithms, with features like quick installation, versatility in integration, and customization options.

  • Python
  • Recommendation Algorithms
  • ItemKNN
  • Matrix Factorization
  • Evaluation

Uploaded on Mar 09, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. CaseRecommender Patrik Dokoupil NSWI166

  2. Introduction - - - Python implementation of several recommendation algorithms Supports two scenarios: rating prediction and item recommendation Item Recommendation - ItemKNN - Matrix factorization with BPR - UserKNN - Rating Prediction - Matrix factorization - SVD - ItemKNN - Item Attribute KNN - UserKNN - -

  3. Usage - Split dataset into train/test folds from caserec.utils.split_database import SplitDatabase SplitDatabase(input_file=dataset, dir_folds=dir_path,n_splits=10).k_fold_cross_validation() - Run Item Recommendation scenario (ItemKNN algorithm) from caserec.recommenders.item_recommendation.itemknn import ItemKNN ItemKNN(train_file, test_file).compute() - Evaluate Item Recommendation from caserec.evaluation.item_recommendation import ItemRecommendationEvaluation ItemRecommendationEvaluation().evaluate_with_files(predictions_file, test_file) - Run Rating Prediction scenario (ItemKNN algorithm) from caserec.recommenders.rating_prediction.itemknn import ItemKNN ItemKNN(train_file, test_file).compute() - Evaluate Rating Prediction from caserec.evaluation.rating_prediction import RatingPredictionEvaluation RatingPredictionEvaluation().evaluate_with_files(predictions_file, test_file) 3

  4. What is good - - - - - MIT license Repository with examples Very easy to install and use Quick access to baselines A lot of algorithms that can be integrated into a more sophisticated recommender system Customizable - via subclassing - 4

  5. Example scenario - compare algorithms - Train, evaluate and compare several item recommendations algorithms in terms of MAP on movielens-100k dataset. 5

  6. Comparing algorithms - results 6

  7. Comparing algorithms - results for custom MAP calculation 7

  8. What is not so good - - Not so easy to add custom evaluation metrics Weird evaluation (MAP > 40% does not seem realistic) - Probably incorrect calculation of MAP - Evaluated only on test set interactions (in some sense we are just ranking relevant items) Weird dataset splitting (user sets are same for both test and train) Rarely updated (just 3 commits in whole 2021) - - 8

More Related Content