Skip to main content

Implementation of the ShaRP framework.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xai_sharp-0.1.0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xai_sharp-0.1.0-py3-none-any.whl (41.4 kB view details)

Uploaded Python 3

File details

Details for the file xai_sharp-0.1.0.tar.gz.

File metadata

  • Download URL: xai_sharp-0.1.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for xai_sharp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b506d017fa7e59f030801808bdc77571c9cfb93ba641246ce516b1df82486a3
MD5 64d0e9a799a1f9824b3d69bcac188d78
BLAKE2b-256 9368ee095c29b1a31cf4f26cc742968ae1f537a2ec77ec0ec97b6172d32300a7

See more details on using hashes here.

File details

Details for the file xai_sharp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xai_sharp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 41.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for xai_sharp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d141d4771032fc6144bb4d1307e7ad0284c511742aa844890eea7765b4b9376
MD5 a7485f55f44deac61a69d4e18f24c072
BLAKE2b-256 f40233ae9637adc46c45efe699f05445a44df66bdcd480aa066d9a588a192808

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page