Coder Social home page Coder Social logo

rishidarkdevil / regularization-based-fair-classifier Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 1.13 MB

Here we deal with the issue of fairness in machine learning classification algorithm and we try to exploit regularization technique to attain fairness.

License: MIT License

Jupyter Notebook 98.70% Python 0.62% R 0.69%
ai-fairness machine-learning scikit-learn pytorch regularization classification fairness-ml implementation-of-research-paper

regularization-based-fair-classifier's Introduction

Classifier Fairness

Here I address the issue of fairness in Machine Learning classification algorithms. In many daily life scenario, where machine learning is gradually being incorporated in various applications, it becomes increasing important to address the issue of fairness i.e. our model should not discriminate among individuals based on their color, caste, race, sex, etc.

Unfortunately, various machine learning algorithms if not addressed with proper fairness intervention will happily increase accuracy but will not consider providing a fair output. After all we train models to remove the human biasedness from making a decision in many situations. So, it is imporrtant to address this issue and we do that here.

We discuss about various metrics, definitions, implementations and techniques to mitigate unfairness in trained model here.

To view our analysis in sequential order, see Fair-Classifier.ipynb.

The file descriptions:

  • Fair-Classifier.ipynb: Introduction to why Fairness is an issue, Fairness Metric Definitions, Fairness Definitions, Index of techniques widely used and developed till now to address fairness issue in machine learning models and data.
  • Fairness-Definitions-Comparison.ipynb: Application of the definitions seen in above file on a dataset. Comparing the value obtained from several metrics and deciding whether the data is fair or not and evaluating fairness of the trained model.
  • Fairness-New-Definitions.ipynb: New fairness definitions(PIL Test) presented along with discussion on each definition.
  • Fairness-Regularization.ipynb: Fairness based Regularization technique presented and implementation .
  • PIL-Test-Implementation.ipynb: Implementation of PIL Test as described in Fairness-New-Definitions.ipynb.
  • Regularisation.R: It contains the R-Code to perform the regularization based on minimizing FPR and FNR, it is not working yet.
  • Fairness New Definition.pdf: It contains a possibly new definition for fairness.

I have learnt several important concepts and packages while doing this project, which includes:

  • PyTorch, aif360: I have learnt PyTorch to implement NNs and have exploited it's autograd feature to fit custom regularized model based on minimizing fairness imbalance of the trained model. I also learnt the aif360 package which consists of several fairness based metrics and dataset for easier computation and implementation of fairness at all levels starting from fairness pre-processing to post-processing.
  • Practical Fairness: I have read almost the entire book of 'Practical Fairness' while doing this project.
  • Research Paper Implementation: I have gone through several research papers and implemented them while doing this project which includes 'Fairness Definitions Explained' from 2018 ACM/IEEE International Workshop on Software Fairness and 'Learning Fair Classifiers: A Regularization-Inspired Approach' from FATML, August 2017, Halifax, Nova Scotia, Canada.

regularization-based-fair-classifier's People

Contributors

aytijhya avatar rishidarkdevil avatar sam31-2001 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.