Giter Club home page Giter Club logo

coresetindividualfairness's Introduction

Coreset for Individual Fairness

The repo contains the code for creating Coreset for the Individual Fair Clustering problem. Part of this work is accepted at AISTATS 2022. The paper title is "On Coresets for Fair Regression and Individually Fair Clustering". To access the code for fair regression the link is: https://github.com/jayeshchoudhari/CoresetsForFairRegression

Code Compilation

Compile the code using:

make

Run Individual Fairness Coreset Algorithm

./mainIF_Coreset input_coreset_file_name no_of_centers full_data_file_name fair_radius_file_name_MV

Parameters:

  • input_coreset_file_name: Input dataset, where each line is a data point -- this is the coreset file or full data file
  • no_of_centers: Number of centers (k)
  • full_data_file_name: File containing the full dataset
  • fair_radius_file_name_MV: file containing fair radius for each data point on each line. Each line contains two space separated values. First value is an integer which is the ID of the data point, and second value is a float, which is the fair radius according to Mahabadi Vakilian Algorithm.

Creating coreset from data:

python3 createCoreset.py datasetName input_file no_of_centers real_or_semi-synthetic

Parameters:

  • datasetName: dataset name (make sure that a folder named 'datasetNameCoreset' exists inside 'datasets' folder)
  • input_file: name of the input dataset file
  • no_of_centers: No. of centers (k)
  • real_or_semi-synthetic: 0 for real dataset and 1 for semi-synthetic
./mainIF_MV input_file_name no_of_centers

Creating Semi-Synthetic Data:

python3 createSemiSyntheticDataset.py input_file_name output_file_name no_of_uar_points no_of_final_generated_points

Parameters:

  • input_file_name: Input dataset, where each line is a data point
  • output_file_name: name of the file that will contain the final generated set of points
  • no_of_uar_points: number of points to be selected uniformly at random (these points will be duplicated using a power law distribution on these points)
  • no_of_final_generated_points: number of points to be generated at the end using the power law distribution on the uniformly selected points.

Creating coreset from Semi-Synthetic Data:

python3 createCoreset.py datasetName input_file no_of_centers real_or_semi-synthetic

Parameters:

  • datasetName: dataset name (make sure that a folder named 'datasetNameCoreset' exists inside 'datasets' folder)
  • input_file: name of the input dataset file
  • no_of_centers: No. of centers (k)
  • real_or_semi-synthetic: 1 for semi-synthetic and 0 for real dataset

coresetindividualfairness's People

Contributors

jayeshchoudhari avatar rachitchhaya avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zshwuhan

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.