Skip to main content

ShaRP

Github Actions Documentation Status Black Python Versions Pypi Version Downloads DOI

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}
}

Metadata

Release files for xai-sharp 0.1.1

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

Source distribution (sdist)

Source distribution for xai-sharp 0.1.1
File Size Uploaded Provenance Actions
xai_sharp-0.1.1.tar.gz 34.8 kB Without provenance Details for xai_sharp-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xai-sharp 0.1.1
File Interpreter ABI Platform Actions
xai_sharp-0.1.1-py3-none-any.whl Python 3 none any Details for xai_sharp-0.1.1-py3-none-any.whl

Total release size: 77.2 kB

Release files / xai_sharp-0.1.1.tar.gz

Download URL xai_sharp-0.1.1.tar.gz
Size 34.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e31fa4ef105c0b0fd3af4b85bb5212442f38f438175882bf942f9444e20f3dce
BLAKE2b-256 checksum
How to use checksums
875d603e58246c1a2d3f900fe7a94b46c5eb9c70e971abcaea057771e81ab8da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / xai_sharp-0.1.1-py3-none-any.whl

Download URL xai_sharp-0.1.1-py3-none-any.whl
Size 42.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06b05507a0eaacfbfcb42359094967e5ad5a964245a58a757084afbad0f38a58
BLAKE2b-256 checksum
How to use checksums
c3b146509ab13740b590101117af772b40702e83c881cda47559c183b01b8f59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Security for xai-sharp 0.1.1

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