Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kat-leen committed Sep 14, 2021
1 parent 466f5ba commit cf913bd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Binary file added img/train_set_corrupted_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/train_set_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion mplc/doc/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,17 @@ my_scenario = Scenario(partners_count=3,

### Plot data distribution

If you whish to visualize the partners' ground truth distribution of the train set per class (with and without corruption if there is any), you can use the method `plot_data_distribution()`. You may choose whether you want to display the plot straight away (`display` is `True` by default) or save it (`save` is `False` by default).
If you wish to visualize the partners' ground truth distribution of the train set per class (with and without corruption if there is any), you can use the method `plot_data_distribution()`. You may choose whether you want to display the plot straight away (`display` is `True` by default) or save it (`save` is `False` by default).

```python
my_scenario.plot_data_distribution(save=False, display=True)
```

![Example of the train set distribution for a scenario with 3 partners as specified by the user](../../img/train_set_ground_truth.png)
![Example of the train set distribution after corruption](../../img/train_set_corrupted_ground_truth.png)

See the [Reference Scenarios](https://github.com/SubstraFoundation/distributed-learning-contributivity/blob/master/notebooks/reference_scenarios/benchmarks.ipynb) notebook for examples.

> Note: the plot is automatically saved when calling the `run()` method described below.
### Run it
Expand Down
1 change: 1 addition & 0 deletions mplc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from . import constants

# Graphics configuration
sns.set_style("white")
pylab.rcParams.update({'font.size': 18})

Expand Down

0 comments on commit cf913bd

Please sign in to comment.