Metadata-Version: 2.4
Name: xai-sharp
Version: 0.1.1
Summary: Implementation of the ShaRP framework.
Home-page: https://github.com/DataResponsibly/sharp
Download-URL: https://github.com/DataResponsibly/sharp
Maintainer: J. Fonseca
Maintainer-email: jpfonseca@novaims.unl.pt
License: MIT
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Requires-Dist: pandas>=1.3.5
Requires-Dist: scikit-learn>=1.2.0
Requires-Dist: tqdm>=4.46.0
Provides-Extra: optional
Requires-Dist: matplotlib>=2.2.3; extra == "optional"
Provides-Extra: docs
Requires-Dist: matplotlib>=2.2.3; extra == "docs"
Requires-Dist: sphinx>=4.2.0; extra == "docs"
Requires-Dist: numpydoc>=1.0.0; extra == "docs"
Requires-Dist: sphinxawesome-theme>=5.0.0; extra == "docs"
Requires-Dist: recommonmark>=0.7.1; extra == "docs"
Requires-Dist: sphinx-markdown-tables>=0.0.17; extra == "docs"
Requires-Dist: sphinx-gallery>=0.15.0; extra == "docs"
Provides-Extra: examples
Provides-Extra: tests
Requires-Dist: pytest-cov>=3.0.0; extra == "tests"
Requires-Dist: flake8>=3.8.2; extra == "tests"
Requires-Dist: black>=22.3; extra == "tests"
Requires-Dist: pylint>=2.12.2; extra == "tests"
Requires-Dist: mypy>=1.6.1; extra == "tests"
Requires-Dist: types-requests>=2.31.0.10; extra == "tests"
Requires-Dist: coverage>=6.2; extra == "tests"
Requires-Dist: numpydoc>=1.0.0; extra == "tests"
Provides-Extra: all
Requires-Dist: numpy>=1.20.0; extra == "all"
Requires-Dist: pandas>=1.3.5; extra == "all"
Requires-Dist: scikit-learn>=1.2.0; extra == "all"
Requires-Dist: tqdm>=4.46.0; extra == "all"
Requires-Dist: matplotlib>=2.2.3; extra == "all"
Requires-Dist: pytest-cov>=3.0.0; extra == "all"
Requires-Dist: flake8>=3.8.2; extra == "all"
Requires-Dist: black>=22.3; extra == "all"
Requires-Dist: pylint>=2.12.2; extra == "all"
Requires-Dist: mypy>=1.6.1; extra == "all"
Requires-Dist: types-requests>=2.31.0.10; extra == "all"
Requires-Dist: coverage>=6.2; extra == "all"
Requires-Dist: sphinx>=4.2.0; extra == "all"
Requires-Dist: numpydoc>=1.0.0; extra == "all"
Requires-Dist: sphinxawesome-theme>=5.0.0; extra == "all"
Requires-Dist: recommonmark>=0.7.1; extra == "all"
Requires-Dist: sphinx-markdown-tables>=0.0.17; extra == "all"
Requires-Dist: sphinx-gallery>=0.15.0; extra == "all"
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

<div align="center">
    <h1 align="center">ShaRP</h1>
</div>

<p align="center">
<a href="https://github.com/DataResponsibly/ShaRP/actions/workflows/ci.yml"><img alt="Github Actions" src="https://github.com/DataResponsibly/ShaRP/actions/workflows/ci.yml/badge.svg"></a>
<a href="https://dataresponsibly.github.io/ShaRP/"><img alt="Documentation Status" src="https://github.com/DataResponsibly/ShaRP/actions/workflows/deploy-docs.yml/badge.svg"></a>
<a href="https://github.com/psf/black"><img alt="Black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13-blue"><img alt="Python Versions" src="https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13-blue"></a>
<a href="https://badge.fury.io/py/xai-sharp"><img alt="Pypi Version" src="https://badge.fury.io/py/xai-sharp.svg"></a>
<a href="https://pepy.tech/project/xai-sharp"><img alt="Downloads" src="https://static.pepy.tech/personalized-badge/xai-sharp?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=downloads"></a>
<a href="https://doi.org/10.48550/arXiv.2401.16744"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.48550/arXiv.2401.16744.svg"></a>

``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](https://dataresponsibly.github.io/ShaRP/).

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