GithubHelp home page GithubHelp logo

fagan2888 / contrastive-explanation-method Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm/contrastive-explanation-method

0.0 0.0 0.0 2.28 MB

Codes for reproducing the contrastive explanation in “Explanations based on the Missing: Towards Contrastive Explanations with Pertinent Negatives”

Home Page: https://arxiv.org/abs/1802.07623

License: Apache License 2.0

Python 100.00%

contrastive-explanation-method's Introduction

Contrastive-Explanation-Method

Codes for reproducing the contrastive explanation in “Explanations based on the Missing: Towards Contrastive Explanations with Pertinent Negatives

To find the pertinent positive (PP) of an instance,

python3 main.py -i 2953 --mode PP --kappa 10 --gamma 100

This would find the PP of image ID 2953 in the test images from the MNIST dataset.

From left to right: the original image and the pertinent positive component. This PP in Image 2953 is sufficient to be classified as 5.

To find the pertinent negative (PN) of an instance,

python3 main.py -i 340 --mode PN --kappa 10 --gamma 100

This would find the PN of image ID 340 in the test images from the MNIST dataset.

From left to right: the original image, the pertinent negative component and the image composed of the original image and PN. If we add PN to Image 340, it would be classified as 5.

The argument kappa (confidence lebel) and gamma (regularization coefficient of autoencoder) are tuning parameters for the optimization setup. Both PP and PN are used to explain the model prediction results. For more details, please refer to the paper.

contrastive-explanation-method's People

Contributors

kant avatar pinyuchen avatar stevemart avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.