Git Product home page Git Product logo

ml18's Introduction

Machine Learning project 2018/19: Ensemble Fair Algorithms for Classification

Installation set-up

  • create a virtual environment with Conda
conda create --name aif360 python=3.5

To activate the environment, type

conda activate aif360

or source activate aif360 for older version of conda
or activate aif360 for Windows.
To deactivate the environment, type

conda deactivate

or similarly source deactivate, or deactivate

  • install requirements provided by requirements.txt.
    This file consists of a list of packages used for this project. You can install the requirements in the virtual environment after activating it by typing the following:
pip install -r requirements.txt

Project source codes

  • dataset : a folder which contains the three original data sets used in this project (Adult, Compas, German)
  • results : folder which stores all the results in csv format
  • codes : original code for the three classifiers and ensemble. There is an output folder which stores the output data after classification

Testing examples

To test the codes, first you need to activate the environment, then go to the codes directory.

source activate aif360
cd codes

We have three scripts which run the project for three different datasets.

  • run_adult.py : script to run the project with Adult dataset.
  • run_compas.py : script to run the project with Compas dataset.
  • run_german.py : script to run the project with German dataset.

    To run one of the above files, type:
python run_<adult/compas/german>.py

The three files above save the output (accuracy and fairness scores for multiple runs) to a csv file stored in the results folder.

  • analysis-compas.R : script for plotting the results obtained from the previous step.
  • alphaCalc.R : script to create the alpha plot which shows combined scores of accuracy and fairness.
    You can also simply run the demo code in jupyter notebook.
  • demo.ipynb : script for demo. Store results for accuracy and fairness metrics as a dataframe for all classifiers.

ml18's People

Contributors

zahrafitrianti avatar agarwalmanvi avatar dushiel avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

zahrafitrianti

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.