# To Achieve Fair Ensemble: An Efficient Algorithm for Computing Optimal Wasserstein Ball Center

This repository is the official implementation of To Achieve Fair Ensemble: An Efficient Algorithm for Computing Optimal Wasserstein Ball Center.

## Requirements

- MATLAB
- Windows

## Dataset

Due to the limitation of the size of the files, we can't upload all the experimental datasets.
The FairFace Dataset can be found at https://github.com/joojs/fairface. License: CC BY 4.0. The label of images we use is in test_race_label.mat of filder Data.
The synthetic datasets are in folder Data.
"testN20...90.mat" are data for experiment in row 1 column 1 and row 1 column 2 of Figure 2.
"testm100...700.mat" are data for experiment in row 2 column 1 and row 2 column 2 of Figure 2. 
"test_NBig1...6.mat" are data for experiment in row 1 column 3 of Figure 2. 
"test_mBig1...6.mat" are data for experiment in row 2 column 3 of Figure 2. 
"test_w0...5.mat" are data for experiment in Figure 4.

##Usage

Folder Algorithm is our algorithm of WBC.
 - WBC.m: our main algorithm.
 - Example.m: an example.

Folder Experiment is all the experiment we have.
 - test_number.m: the experiments for the computation performance.
 - test_weight.m: the experiments for the uneven distributions.
 - test_race.m: the experiment on FairFace Dataset.



