-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Explanation API and feature importance for GBM #2564
Conversation
explanation.add(feat_imp) | ||
|
||
# TODO: | ||
expected_values.append(0.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tgaddair what should the expected values be for GBM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Travis: value of 0
OK for now, can look into this again depending on future visualizations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks great, very positive improvement toludwig.explain
. Made a few optional refactoring suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* add docstring for explain_ig * solidify Explainer API * add gbm explainer * add dataclasses for typed explanations * add GBM feature importance * remove unused imports * add tests * fix test * extract explanation into file * rename base to explainer * remove unused kwargs * remove device placement from base explainer * use proper field from gbm
* add docstring for explain_ig * solidify Explainer API * add gbm explainer * add dataclasses for typed explanations * add GBM feature importance * remove unused imports * add tests * fix test * extract explanation into file * rename base to explainer * remove unused kwargs * remove device placement from base explainer * use proper field from gbm
Introduces abstract
Explainer
class with the following method for explaining model predictions:Explanation
is a dataclass for storing explanations for a single row of input data.Additionally:
Explainer
base classGBMExplainer
for explaining GBM models using LightGBM feature importance