This repository contains the code for Personalized Federated Learning via Stacking.
main.py: Main script for launching a single simulated federation, typically used with scripts inlaunch_scripts/.data.py: Handles dataset fetching and preprocessing.partitioning.py: Contains functions for natural, quantity skew, label skew, and vertical partitioning.transformers.py: Includes a custom scikit-learn transformer for dealing with vertically partitioned data.figs.ipynb: Processes results and generates figures as presented in the paper.
To reproduce the results and figures from the paper, follow these steps:
- Install Python package requirements with
pip install -r requirements.txt. - Obtain a Kaggle API key by following these instructions.
- Run
sh launch_scripts/all.sh. - Open and execute
figs.ipynb.