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

GroupShapley in python #350

Closed
Billwuzl opened this issue Jul 11, 2023 · 5 comments · Fixed by #375
Closed

GroupShapley in python #350

Billwuzl opened this issue Jul 11, 2023 · 5 comments · Fixed by #375
Labels
bug Something isn't working

Comments

@Billwuzl
Copy link

Hi!

Many thanks for this awesome project! I am currently working on a python project that requires me to calculate Shapley values of feature groups. Your project, Shapr, is really helpful to me. However, I noticed that the python wrapper does not include the calculation of Group Shapley

May I know when the version that includes Group Shapley in python will be released?

@martinju
Copy link
Member

Hi, thank you for your interest.

I believe it is supposed to work through the group input argument. What kind of error message do you get? I am currently not near a computer.

@Billwuzl
Copy link
Author

Thank you for your timely reply.

https://github.com/NorskRegnesentral/shapr/blob/master/python/shaprpy/explain.py#L116

At line 116 of explain.py, it seems to me that no group list is used.

@Billwuzl
Copy link
Author

When my input includes group list, the same output is given as if group list is not included.

@martinju martinju added the bug Something isn't working label Jul 14, 2023
@git-mojo
Copy link

git-mojo commented Sep 12, 2023

Looks like wrong arguments in in L117 and L119. Shouldn't this be

        group = maybe_null(group),
        n_batches = maybe_null(n_batches),

?

@martinju
Copy link
Member

Yes, there is a bug here, and what you write above is correct. Unsure if further edits are needed, though. Unfortunately, I have not yet had time to fix it, but will try to prioritize it soon. Feel free to provide a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants