Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

183 make games be also callable with a tuplelist of tuples #242

Merged

Conversation

Advueu963
Copy link
Collaborator

Added functionality for Game to be called with both list of tuples or just a tuple.
Depending on optional player names given to the game, the elements of the tuple(s) can be strings.

@Advueu963 Advueu963 self-assigned this Oct 4, 2024
@Advueu963 Advueu963 linked an issue Oct 4, 2024 that may be closed by this pull request
Copy link
Owner

@mmschlk mmschlk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I marked a couple of nitpicks. 🤓

shapiq/games/base.py Outdated Show resolved Hide resolved
shapiq/games/base.py Outdated Show resolved Hide resolved
shapiq/games/base.py Outdated Show resolved Hide resolved
shapiq/games/base.py Outdated Show resolved Hide resolved
shapiq/games/base.py Outdated Show resolved Hide resolved
@Advueu963 Advueu963 requested a review from mmschlk October 25, 2024 06:51
Copy link
Owner

@mmschlk mmschlk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! :) I like this much better just raising the error. :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the examples!

@mmschlk mmschlk merged commit 3c3dfc2 into main Oct 25, 2024
8 checks passed
@mmschlk mmschlk deleted the 183-make-games-be-also-callable-with-a-tuplelist-of-tuples branch October 25, 2024 14:15
mmschlk added a commit that referenced this pull request Oct 25, 2024
* integrates the SI graph plot and streamlines the plots

* adds first draft of visualization notebook

* adds notebook to docs

* updates abbreviate function

* updates notebook

* adds unit test for abbreviate features

* fixed feature_names being None

* Delete .github/workflows/autoupdate.yml

* 190 add a tutorial notebook for data valuation (#243)

* adds useful properties to game and closes #251. (#254)

* adds useful properties to game and closes #251.

Adds `empty_coalition_value`, `grand_coalition_value` properties to game and allows for a getitem (without computation) of a game.

* fixed the setter of _empty/_grand values

* fixed the setter of _empty/_grand values

* updated empty value

* 183 make games be also callable with a tuplelist of tuples (#242)

* added possibility of tuple/list of tuple in BaseGame __call__

* Added possibility for to Game coalitions with given player_names

* Added possibility to call game based on given player_names

* removed player_names property as it caused conflicts

* made __call__ annotations for python3.9

* refactor game call with strings

* refactor game call of tuple and list

* Reimplement _check_coalitions to fewer lines.

---------

Co-authored-by: Maximilian <[email protected]>

---------

Co-authored-by: Paul Hofman <[email protected]>
Co-authored-by: Theo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Games be also callable with a tuple/list of tuples
2 participants