Skip to main content

Implementation of the ShaRP framework.

Project description

ShaRP

Github Actions Documentation Status Black Python Versions 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.9 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 :

pip install -U git+https://github.com/DataResponsibly/ShaRP

The documentation includes more detailed installation instructions.

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.1a1.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

xai_sharp-0.1a1-py3-none-any.whl (38.2 kB view details)

Uploaded Python 3

File details

Details for the file xai_sharp-0.1a1.tar.gz.

File metadata

  • Download URL: xai_sharp-0.1a1.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for xai_sharp-0.1a1.tar.gz
Algorithm Hash digest
SHA256 68facacacc829cfb69b36ccc0da47ec86af9920f94187516ff2d1a53d9dfac7d
MD5 8d7c0ad226d31b4c3265f63d920d395c
BLAKE2b-256 0eacf42d9a0ee15b6a6b2d55937e2ca4952908538d912b109378366b6244b50e

See more details on using hashes here.

File details

Details for the file xai_sharp-0.1a1-py3-none-any.whl.

File metadata

  • Download URL: xai_sharp-0.1a1-py3-none-any.whl
  • Upload date:
  • Size: 38.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for xai_sharp-0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 15eacd8f639673b9572e71cd5a101985d0a12aa037f6f20bfd953bc0aa9ea06c
MD5 448c67b4891b205950a70ff8a3b004fd
BLAKE2b-256 67cb01a2f59f390de78ebe3db10e2b9a99e17c9b659a4d10dddb8414dc229c39

See more details on using hashes here.

Supported by

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