TalwalkarLab/leaf

The statistics for FEMNIST seems to be inaccurate?

Opened this issue · 2 comments

On the site https://leaf.cmu.edu/, FEMNIST is said to have 3,550 users and 805,263 samples. However, I ran the provided command

./preprocess.sh -s niid --sf 1.0 -k 0 -t sample

to get the full-sized dataset, and then run ./stats.sh to get the statistics. The outputs are as follows

0        1
20       4
40       11
60       5
80       16
100      66
120      125
140      394
160      1241
180      329
200      47
220      62
240      95
260      107
280      125
300      167
320      168
340      185
360      172
380      149
400      87
420      36
440      3
460      1
480      0

Summing up the number of clients, we get 3,597 rather than 3,550 ones. Actually, I've also count the total number of samples in train/ and test/, and got 817,851 rather than 805,263.

Is there anything wrong with my command for data processing, which leads to such inconsistency?

Any update on this? I have run into the same issue. I get 817851 samples both when adding up the numbers provided in the "num_samples" field of the jsons and when doing a count of all the labels provided.

I also used the command provided to get the entire dataset, is it possible there are more samples than specified?

Same here. I also get 817851 samples and 3597 users.

This paper [1] also use the same version.

[1] Yuexiang Xie, Zhen Wang, Dawei Gao, Daoyuan Chen, Liuyi Yao, Weirui Kuang, Yaliang Li, Bolin Ding, Jingren Zhou. FederatedScope: A Flexible Federated Learning Platform for Heterogeneity. https://arxiv.org/pdf/2204.05011.pdf?utm_source=pocket_mylist