Skip to main content

A python package to calculate Myerson values from game theory and use them as explanations for graph neural networks.

Project description

Myerson logo banner

test Documentation Status

Calculate Myerson values and explain GNNs

This package implements the Myerson solution concept from cooperative game theory. The Myerson values attribute every player of a game their fair contribution to the games payoff. Myerson values are related to Shapley values but the player cooperation is restricted by a graph.

A graph neural network (GNN) can be treated as a coalition function for a game and the Myerson values can be used as feature attribution explanations to understand a model prediction. This package also implements Methods to explain PyG GNNs with Myerson values.

Calculating the Myerson value scales exponentially with bigger graphs / more players. Therfore, Monte Carlo sampling techniques were implemented to approximate the Myerson values.

Installation

Install the complete package with PyTorch dependencies using one of the following commands:

# pip
pip install myerson[explain]

# conda / mamba
conda install myerson

# for conda / mamba, you need to manually install pytorch dependencies
conda install pytorch torchvision torchaudio cpuonly -c pytorch
conda install conda install pyg -c pyg

If you are only interested in the game theoretic part you don't need to install PyTorch:

# pip 
pip install myerson

# conda / mamba
conda install myerson

Examples and Documentation

Example uses can be found here. The full documentation can be found at https://myerson.readthedocs.io/.

Results of Explaining GNNs for Cheminformatics

This package was developed to explain GNN predicitons for Cheminformatics approaches. The repository with code and data for these experiments can be found here: https://github.com/kochgroup/myerson_results.

Citation

TBD.

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

myerson-1.0.0.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

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

myerson-1.0.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file myerson-1.0.0.tar.gz.

File metadata

  • Download URL: myerson-1.0.0.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for myerson-1.0.0.tar.gz
Algorithm Hash digest
SHA256 24df8a85d16b3810828896f56ae08fc91c80d91fa3efd5e468efc5b4e3483939
MD5 4340e2b17906e46366c2a32b14df45b8
BLAKE2b-256 116cfaf1b2fef944025aabf0b4043777a94e66e38fbbe930aeee2dc3ddf25fab

See more details on using hashes here.

Provenance

The following attestation bundles were made for myerson-1.0.0.tar.gz:

Publisher: publish.yml on kochgroup/myerson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file myerson-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: myerson-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for myerson-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8eec79a439fda7c7afb0c2c1c4219953189e80cf0136134afb15daa668ef0df
MD5 bcb7e0f6d52caf5b664546e35c1df61d
BLAKE2b-256 22e3a7f3c2d8c1084720d91c060f605397f3a9ce0ab9b6e7dcf4723f60b927b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for myerson-1.0.0-py3-none-any.whl:

Publisher: publish.yml on kochgroup/myerson

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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