This is the numerical implementation for a recent work A Stochastic Alternating Balance -Means Algorithm for Fair Clustering.
The code was implemented using Python 3.6
- numpy
- collections
- time
- matplotlib
- random
- scipy
- sklearn
- multiprocessing
We designed and implemented a novel stochastic alternating balance fair -means (SAfairKM) algorithm, inspired from the classical mini-batch -means algorithm, which essentially consists of alternatively taking pure mini-batch
SAfairKM.ipynb
: demonstrates how to run the proposed algorithm for the given synthetic and real datasets.
utils.py
: contains all the necessary functions and class for the algorithm implementation.
The data folder includes two real datasets: Adult and Bank datasets.