Giter Site home page Giter Site logo

counterfactual-generation-using-wachter-paper's Introduction

Counterfactual-generation-using-Wachter-paper

This is an implementation of basic CFs generation using Wachter paper. The paper uses a basic loss function to generate CFs which may or may not generate explainable CFs.

The loss function minimizes distance between query and CF as well as also minimizes classification loss of CF to other class

In this notebook we use FashionMNIST dataset to generate CFs.

First we train a CNN based classifier to classify FashionMNIST dataset, then we use this classifier to generate CF with the help of Wachter loss function.

We try 3 different experiements

  1. We have a query data and randomly selected data which we will optimize to be the CF of the query data. In this we minimize distance between query and other data along with maximizing distance between classification error of other data to class of initial class of other data(i.e. other data should not be in same class as it started with)

  2. We have a query data and randomly selected data which we will optimize to be the CF of the query data. In this we minimize distance between query and other data along with maximizing distance between classification error of other data to class of initial class of query data (i.e. other data should not be in same class as of query data)

  3. Here instead of randomly selecting other data and make it to a CF of query data, we initialize the other data with that of query data and in loss function we minimize distance between query data and cf vector along with minimizing the classification error of cf vector being classified to other class.

counterfactual-generation-using-wachter-paper's People

Contributors

badrinaths avatar badrinathsinghal avatar

Stargazers

 avatar

Watchers

 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.