Skip to content

Explain variable influence in black-box model through pattern mining

License

Notifications You must be signed in to change notification settings

XiaoqiMa/shapSD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shapSD

shapSD is an interpretable framework that enables to inspect variable influence in black box models through pattern mining. Despite the global interpretation and local interpretation, this framework provides a meso-level interpretation, which combines the local interpretation methods and the subgroup discovery technique.

Global Interpretation methods

  • Permutation feature importance
    • measured by by the drop of prediction accuracy of the model after permuting the selected feature
  • SHAP feature importance
    • based on the magnitude of feature contribution using shapley values (estimated by the mean absolute shapley values)

Local Interpretation methods

  • Binary feature value flip
    • to see the effect of a binary feature after we flip the feature value
  • Numeric feature value perturb
    • to see the effect of a numeric feature after we perturb the feature value
  • LIME
    • to train an interpretable model to approximate the predictions of the underlying black box model
  • shapley values
    • to calculate the individual contribution of each feature in an instance to compose the final prediction (from coalition game theory)
  • Kernel SHAP
    • combination of linear LIME and shapley values to get an explanation model

Meso-level Interpretatoin methods

  • Local methods + Pattern Mining

ShapSD Demonstration

  • Tabular Data:

Case study: Adult Income

Comparison of decision tree and subgroup discovery

  • Textual Data:

Case study: Amazon Review

Case study: Review sentiment

  • Neural Networks:

Multilayer Perceptron

LSTM

The MIT License (MIT)

Copyright (c) 2019 Xiaoqi Ma

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Explain variable influence in black-box model through pattern mining

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages