Skip to content

Implementation of the algorithm proposed in the paper "ShaRP: Explaining Rankings with Shapley Values", by Pliatsika et al.

License

Notifications You must be signed in to change notification settings

DataResponsibly/ShaRP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Implementation of the algorithm proposed in the paper "ShaRP: Explaining Rankings with Shapley Values", by Pliatsika et al.

Resources

License

Stars

Watchers

Forks

Packages

No packages published