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

fix: Explanation hstack undefined name error #86

Merged
merged 2 commits into from
May 29, 2023

Conversation

thatlittleboy
Copy link
Collaborator

@thatlittleboy thatlittleboy commented May 26, 2023

Part of #54.

  1. Explanation.hstack method was using a non-existent variable "axis" (probably copied from the other helper methods like sum). The implementation as it is didn't make any sense, so I modified it to what I think made the most sense, which is to hstack the inner arrays and return a new Explanation object.
  2. Added tests for hstack only.

@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Merging #86 (8179889) into master (3213a3b) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
+ Coverage   52.22%   52.25%   +0.03%     
==========================================
  Files          90       90              
  Lines       13146    13146              
==========================================
+ Hits         6866     6870       +4     
+ Misses       6280     6276       -4     
Impacted Files Coverage Δ
shap/_explanation.py 55.66% <100.00%> (+0.79%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@thatlittleboy thatlittleboy added the bug Something isn't working label May 27, 2023
`hstack` as was initially implemented cannot run because `axis` is not
defined.
My best guess for the implementation for `hstack` is to hstack the
values and return a new Explanation object, rather than doing a "min". I
assume that was just a typo / copy-paste error.
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 this pull request may close these issues.

2 participants