shapley 0.1.0

A fast shapley score calculator
Documentation

Shapley

Crates.io docs.rs MIT licensed

shapley is a fast shapley value calculator written in rust.

Quick Start

Install

cargo add shapley

Usage

use shapley::Shapley;

let shapley = Shapley::new(players: [1, 2], coalition_worth: {
    (): 0,
    (1,): 10,
    (2,): 20,
    (1, 2): 30,
});

println!("{}", shapley.shapley_value(1)); // 10
println!("{}", shapley.shapley_value(2)); // 20