This is the package of codes and datasets used in paper ''Federated Multi-armed Bandits'', which is accepted to AAAI 2021.
The files ''Fed1_UCB_CR.py'', ''Fed2_UCB_CR.py'' and ''Fed2_UCB_CR_short.py'' are for the simulations of cognitive radio systems with the synthetic datasets. ''Fed1_UCB_RS.py'' and ''Fed2_UCB_RS.py'' are for the simulations of recommender systems with the MovieLens datasets. The synthetic datasets are generated in the corresponding codes and the preprocessed MovieLens datasets are in the file ''movielens_norm_100.npy''. The original MovieLens datasets can be downloaded here and the preprocessing steps are specified in the paper.
The original codes are written with Python 3.7, and the needed packages are ''numpy 1.18.1'' and ''matplotlib 3.1.3''.
The performance of Fed1-UCB algorithm with the synthetic datasets as shown in Fig. 3 can be get by directly running the file ''Fed1_UCB_CR.py''. The default setting is for
The performance of Fed2-UCB algorithm with the synthetic datasets as shown in Fig. 4 can be get by directly running the file ''Fed2_UCB_CR.py''. The default setting is for
The performance of Fed2-UCB algorithm with the synthetic datasets and a reduced horizon as shown in Fig. 5 can be get by directly running the file ''Fed2_UCB_CR_short.py''. The default setting is for
The performance of Fed1-UCB algorithm with the real-world datasets as shown in Fig. 6 can be get by directly running the file ''Fed1_UCB_RS.py''. The default setting for Fed1-UCB is