A library to compute fairness of recommender systems.
Project description
recsyslearn is a Python library designed to evaluate recommendation systems comprehensively. It offers a set of tools to measure recommendation accuracy, coverage, novelty, and fairness. This library is a valuable resource for data scientists and engineers who aim to enhance the performance and fairness of their recommendation algorithms.
Key Features
Dataset Utilities
recsyslearn simplifies the process of calculating item popularity and user activity, and of segmenting (i.e., categorizing) users and items into groups. The users and items can be segmented based on various criteria, hence providing the basis for group fairness analyses on several dimensions.
In particular, the following type of segmentations are provided: * item segmentation based on a popularity value, or user segmentation based on an activity value, corresponding to the percentage of user-item interactions. * user or item segmentation based on one of their categorical features (e.g., user gender, or item genre). * item segmentation based on the cumulative number of interactions of the items in each group. For instance, keeping the argument of the method to the default value of 80 − 20, the most popular items corresponding to the first group account for 80% of the interactions, and the items in the second group account for the remaining 20%. * user segmentation based their grade of activity. For instance, keeping the argument of the method to the default value of 80 − 20, the most active 80% users will belong to the first group, and the least active 20% users to the second.
Accuracy Evaluation metrics
NDCG@k: recsyslearn computes the Normalized Discounted Cumulative Gain (NDCG) metric to assess recommendation accuracy at a specific cutoff k. NDCG@k provides insights into the relevance of recommended items and their ranking.
Beyond Accuracy metrics
Coverage: evaluate the coverage of your recommendation system using various metrics. These metrics measure the extent to which unique items are recommended to users and provide insights into the diversity of recommendations.
Novelty: measure the novelty of recommendations to ensure that users receive fresh and engaging content.
recsyslearn helps you assess the diversity and freshness of recommended items.
Fairness metrics
Entropy: the measure of diversity (i.e., recommendations or accurate recommendations) over user or item groups.
Mutual Information: measures to what extent the information on the user group provides information about the groups to which the recommendations belong.
Kullback-Leibler: measures the KL divergence between the distribution of utility over user or item groups, computed on the list of recommendations, and a target distribution.
License
Recsyslearn is released as free software under the GNU General Public License v3.
Documentation
For in-depth documentation, detailed explanations of functions, and usage examples, please visit the official documentation.
Citation
If you use recsyslearn in your research, please cite the following paper:
@proceedings{Moscati2023MultiObjectiveHyperOpt,
title = {Multiobjective Hyperparameter Optimization of Recommender Systems},
author = {Moscati, Marta and Deldjoo, Yashar and Carparelli, Giulio Davide and Schedl, Markus},
booktitle = {Proceedings of the 3rd Workshop on Perspectives on the Evaluation of Recommender Systems co-located with the 17th ACM Conference on Recommender Systems (RecSys 2023), Singapore, Singapore.},
editor = {Said, Alan and Zangerle, Eva and Bauer, Christine},
publisher = {CEUR-WS.org},
url = {https://ceur-ws.org/Vol-3476/paper3.pdf},
volume = {3476},
year = {2023}
}
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file recsyslearn-2.0.2.tar.gz
.
File metadata
- Download URL: recsyslearn-2.0.2.tar.gz
- Upload date:
- Size: 319.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dcd0d4da0852ab1fa1841a80ce024c86b823aa9f3de0c68a87c7aeaeceb9def |
|
MD5 | e762cf793b41d140fd38c107fe0c106d |
|
BLAKE2b-256 | f12b08b9f0376229d9f098a2ba5793978cb6a4551ce3c86a7fbeb015952cc7d3 |
File details
Details for the file recsyslearn-2.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: recsyslearn-2.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c513d42d08f85baf739dc6ca68dd63c9d4052689a6f7c21758c920ba01c0ae5 |
|
MD5 | 3b317ebd58ad0c38afeada9fb6ec4fcf |
|
BLAKE2b-256 | 172ffcf8e1d186dee701f6c900c080191f8d6be73d649e083d75cfd1f88b7362 |