gnahtb / RealFL

Implement basic steps in a model-centric federated learning model
The Unlicense
0 stars 2 forks source link

Add feature for configuring dataset distribution among the clients #7

Closed tem556 closed 2 years ago

tem556 commented 2 years ago

Two main features added:

  1. You can control how the dataset is divided among clients (label distribution is even in this case)
  2. You can also control how the lables are divided among clients

Use the config.json file to adjust however you want. Set "evenLabelDistributionByClient" to true in config.json if you want first option, and to false if you want second. Add "--config true" to use the added features

Keep in mind the ratios for feature 1. must add up to 1.0. For feature 2, the ratios for each label must also add up to 1.0. Otherwise an exception is thrown. Also make sure number of clients matches how many ratios you give.