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 DOI

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.1.tar.gz (18.3 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.1-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: myerson-1.0.1.tar.gz
  • Upload date:
  • Size: 18.3 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.1.tar.gz
Algorithm Hash digest
SHA256 5d4c335bc02d8204ecc7ec830423854f01928a97d08a27dd94d7b749727b03e8
MD5 4e3e26a5517005663db2179a0cc64311
BLAKE2b-256 a330be327e3b6c6099f4ec94d5926def1f5358e43326dcaa95f8ce30b805b6c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for myerson-1.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: myerson-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7853647241da738ae0e026872285d66a59abce9be61e2e7db8b99eafd6750087
MD5 85bea9132689545fa08c5d8f9cee9599
BLAKE2b-256 30391a28c30fef2de2e747d927e4ae7a7daffe9ffce2b5975f380c090d9af455

See more details on using hashes here.

Provenance

The following attestation bundles were made for myerson-1.0.1-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