src.plotting.task_plot_decomposition
¶
This module holds the code to compute marginal contributions and shapley values.
Module Contents¶
Functions¶
|
|
|
|
|
|
|
|
|
|
|
Compute Shapley values. |
|
|
|
Attributes¶
- _compute_ratios_based_on_shapley_values(s, scenario_to_members: Dict[str, frozenset], no_effects_scenario: str)[source]¶
- _compute_shapley_values(coalitions)[source]¶
Compute Shapley values.
- Parameters
coalitions (pandas.DataFrame) –
A DataFrame where each row contains one coalition and an associated payoff.
"members"
contains an iterable with all the members participating in the specific coalition."payoff"
contains the value associated with the coalition.
- Returns
shapley_values – The Shapley values associated with each of the members found in all coalitions.
- Return type