Skip to main content

Recsyslearn

Test Status Documentation Status Library Version

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 MIT License.

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.

Metadata

Release files for recsyslearn 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for recsyslearn 3.0.0
File Size Uploaded Provenance Actions
recsyslearn-3.0.0.tar.gz 307.5 kB Without provenance Details for recsyslearn-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for recsyslearn 3.0.0
File Interpreter ABI Platform Actions
recsyslearn-3.0.0-py3-none-any.whl Python 3 none any Details for recsyslearn-3.0.0-py3-none-any.whl

Total release size: 322.2 kB

Release files / recsyslearn-3.0.0.tar.gz

Download URL recsyslearn-3.0.0.tar.gz
Size 307.5 kB
Tags Source
SHA-256 checksum
How to use checksums
069016b1fce556770d5109264abaadb31c2edd5f98631901b2debf3ec18494e0
BLAKE2b-256 checksum
How to use checksums
3b0d27c9a7db3f138982393ec22cbae4b739ce5dba5e54c5c731eb027c3a3487
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / recsyslearn-3.0.0-py3-none-any.whl

Download URL recsyslearn-3.0.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fe643910ca7166074bdabf4d829478b852a5de47e2d802b831f2c8520cf47c7
BLAKE2b-256 checksum
How to use checksums
c88f9a750ede49150dfabc110673fe23a8c294cdd892b244294eae080cdcfacb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for recsyslearn 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page