Implementation of the ShaRP framework.
Project description
ShaRP
ShaRP is an open source library with the implementation of the ShaRP
algorithm (Shapley for Rankings and Preferences), a framework that can be used
to explain the contributions of features to different aspects of a ranked
outcome, based on Shapley values.
Installation
A Python distribution of version >= 3.10 is required to run this
project. ShaRP requires:
- numpy (>= 1.20.0)
- pandas (>= 1.3.5)
- scikit-learn (>= 1.2.0)
- ml-research (>= 0.4.2)
Some functions require Matplotlib (>= 2.2.3) for plotting.
User Installation
The easiest way to install sharp is using pip :
# Install latest release
pip install -U xai-sharp
# Install additional dependencies (matplotlib) for plotting
pip install -U "xai-sharp[optional]"
# Install unreleased version (may be unstable)
pip install -U git+https://github.com/DataResponsibly/ShaRP
Installation instruction can also be found in the documentation pages.
Installing from source
The following commands should allow you to setup the development version of the project with minimal effort:
# Clone the project.
git clone https://github.com/DataResponsibly/sharp.git
cd sharp
# Create and activate an environment
make environment
conda activate sharp # Assuming you are have conda set up
# Install project requirements and the research package. Dependecy group
# "all" will also install the dependency groups shown below.
pip install ".[optional,tests,docs]"
Citing ShaRP
If you use sharp in a scientific publication, we would appreciate citations to the following paper:
@article{pliatsika2024sharp,
title={ShaRP: Explaining Rankings with Shapley Values},
author={Pliatsika, Venetia and Fonseca, Joao and Wang, Tilun and Stoyanovich, Julia},
journal={arXiv preprint arXiv:2401.16744},
year={2024}
}
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xai_sharp-0.1.1.tar.gz.
File metadata
- Download URL: xai_sharp-0.1.1.tar.gz
- Upload date:
- Size: 34.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e31fa4ef105c0b0fd3af4b85bb5212442f38f438175882bf942f9444e20f3dce
|
|
| MD5 |
9e382e44bc1d5b3de24ae0753ef9ff33
|
|
| BLAKE2b-256 |
875d603e58246c1a2d3f900fe7a94b46c5eb9c70e971abcaea057771e81ab8da
|
File details
Details for the file xai_sharp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: xai_sharp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 42.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06b05507a0eaacfbfcb42359094967e5ad5a964245a58a757084afbad0f38a58
|
|
| MD5 |
fb32aaca69a81444b22145b50ff81f0a
|
|
| BLAKE2b-256 |
c3b146509ab13740b590101117af772b40702e83c881cda47559c183b01b8f59
|