Skip to content

Adding the Index ID to explain_prediction_best_worst_output - #1365

Merged
freddyaboulton merged 4 commits into
mainfrom
1119-index-id-best-worst
Nov 4, 2020
Merged

freddyaboulton merged 4 commits into
mainfrom
1119-index-id-best-worst

Conversation

@freddyaboulton

@freddyaboulton freddyaboulton commented Oct 29, 2020

Copy link
Copy Markdown
Contributor

Pull Request Description

Fixes #1119.

FYI @RezaAkhtar


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.rst to include this pull request by adding :pr:123.

@freddyaboulton freddyaboulton self-assigned this Oct 29, 2020
@codecov

codecov Bot commented Oct 29, 2020

Copy link
Copy Markdown

Codecov Report

Merging #1365 into main will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1365      +/-   ##
==========================================
+ Coverage   99.95%   99.95%   +0.01%     
==========================================
  Files         213      213              
  Lines       13929    13938       +9     
==========================================
+ Hits        13922    13931       +9     
  Misses          7        7              
Impacted Files Coverage Δ
...tanding/prediction_explanations/_user_interface.py 100.00% <100.00%> (ø)
...s/prediction_explanations_tests/test_explainers.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ed3e37...b2e3cf9. Read the comment docs.

@RezaAkhtar

Copy link
Copy Markdown

LGTM 🆔

Predicted Value: setosa
Target Value: setosa
Cross Entropy: 0.15
Index ID: {{index_0}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why does this have two curly braces?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We call .format once to format the string with the template for the multiclass shap table (that'll remove the outer curly braces) and then in the test we call .format to format the answer with the expected index (that'll remove the inner curly braces).

@bchen1116 bchen1116 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

pipeline.problem_type = problem_type
pipeline.name = "Test Pipeline Name"

def _add_custom_index(answer, index_best, index_worst, output_format):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice!

@freddyaboulton
freddyaboulton force-pushed the 1119-index-id-best-worst branch 2 times, most recently from f121736 to 9ee8ac3 Compare October 30, 2020 20:24
@freddyaboulton
freddyaboulton force-pushed the 1119-index-id-best-worst branch from 9ee8ac3 to 7471c25 Compare November 2, 2020 22:33

@angela97lin angela97lin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Solid, LGTM! I see the updated docs as well. 🥳
image

@CLAassistant

CLAassistant commented Nov 4, 2020

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@freddyaboulton
freddyaboulton force-pushed the 1119-index-id-best-worst branch from 7471c25 to eae4624 Compare November 4, 2020 15:02
@freddyaboulton
freddyaboulton force-pushed the 1119-index-id-best-worst branch from eae4624 to b2e3cf9 Compare November 4, 2020 16:34
@freddyaboulton
freddyaboulton merged commit 86a39b0 into main Nov 4, 2020
@freddyaboulton
freddyaboulton deleted the 1119-index-id-best-worst branch November 4, 2020 21:28
@dsherry dsherry mentioned this pull request Nov 24, 2020
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.

Prediction explanations: display Index ID for best/worst prediction explanations

6 participants