This work proposed the novel approach by converting the output of many clustering algorithm to a cluster fractional allocation matrix (CFAM). Then, takes it as an optimization problem with requirement to satisfy (combined) different types of constraints.
In addition, we also shows practical application namely the attribute-level constraint and the (combined) fairness constraint.
git clone [email protected]:dung321046/ConstrainedClusteringViaPostProcessing.git
cd ConstrainedClusteringViaPostProcessing/
Install conda
Install libs
conda install --yes --file requirements.txt
Install gurobipy
conda config --add channels http://conda.anaconda.org/gurobi
conda install gurobi
export PYTHONPATH="./"
Download:
More details for IDEC and DCC is here Deep Constrained Clustering.
Generate pairwise and cluster-size contraints
python generate_testsets/generate-pw-csize.py --data $DATA
python models/encode-kmeans-post.py --data $DATA
python models/pw-csize-ilp.py --data $DATA --csize True
python models/attribute-level-ilp.py
python fairness/generate_neighbor.py
python fairness/run_individual_fairness.py
python fairness/run_group_fairness.py
python fairness/run_combine_fairness.py