Fix bug on force plots to show feature values for specific rows in training data#3044
Fix bug on force plots to show feature values for specific rows in training data#3044freddyaboulton merged 16 commits intoalteryx:mainfrom
Conversation
…Fixes bug where only first row feature values are show in all row plots.
Codecov Report
@@ Coverage Diff @@
## main #3044 +/- ##
=======================================
+ Coverage 99.8% 99.8% +0.1%
=======================================
Files 313 313
Lines 30567 30579 +12
=======================================
+ Hits 30477 30489 +12
Misses 90 90
Continue to review full report at Codecov.
|
|
@peterataylor Do you need help getting all the checks to pass? |
Thanks for the offer @freddyaboulton ! Having a quick look I should be able to do the release notes. But any guidance on the lint, code coverage and dependency changes would be great. But I will look over the contrib guide again and check the approach. |
|
@peterataylor The "Detect dependency changes" should be fixed as soon as you merge in the latest If you have the development dependencies installed, you should be able to do the following from the top level of the repo: If If you do not have make installed you can look at the Makefile to see what those commands mean and run then yourself. Let me know if you have any other questions! |
|
|
||
| shap_plots = force_plot(pipeline, rows_to_explain, training_data, y) | ||
| for row in shap_plots: | ||
| for ix, row in enumerate(shap_plots): |
There was a problem hiding this comment.
@peterataylor This looks good to me! Thanks for the contribution. I think the one thing that's missing is maybe a unit test to make sure we don't commit the same mistake again in the future. Maybe do one with and without a custom index on training_data?
There was a problem hiding this comment.
Thanks @freddyaboulton . I've added some tests to test_force_plots that use the existing parameter sets (rows 0 and 0-4). It required inspection of the returned plot object to ensure the feature values matched those that correspond to the rows_to_explain. I confirmed the tests failed with previous version and pass now. You will probably want to review though. Thanks!
freddyaboulton
left a comment
There was a problem hiding this comment.
@peterataylor This looks good to me! Thank you for the contribution.
…Fixes bug where only first row feature values are show in all row plots.
Pull Request Description
Fixes bug as described in #3045.
After creating the pull request: in order to pass the release_notes_updated check you will need to update the "Future Release" section of
docs/source/release_notes.rstto include this pull request by adding :pr:123.