This project implements Federated Learning for ECG signal classification using the PhysioNet/CinC Challenge 2017 dataset. The objective is to categorize ECG signals into three classes: Normal, Atrial Fibrillation, and Other.
- OS: Linux Mint 22
- Python: 3.11.11
-
Download the dataset.
bash download_dataset.sh
-
Install dependencies.
pip install -r requirements.txt
-
Login to Wandb.
Choose one of the following methods:
- Via command line.
wandb login
- Using .env file.
echo "WANDB_API_KEY=your_wandb_api_key" > .env
- Using environment variable.
export WANDB_API_KEY=your_wandb_api_key
If you prefer not to use Wandb (not recommended), you can disable it:
- Using .env file.
echo "WANDB_MODE=disabled" > .env
- Using environment variable.
export WANDB_MODE=disabled
- Via command line.
-
Run the following .ipynb files in the order:
- Data preprocessing: preprocessing.ipynb
- Split dataset: split_dataset.ipynb
- Train and evaluate the model:
- For Centralized Learning: train_centralized.ipynb
- For Federated Learning: train_federated.ipynb