Follow these steps to set up the environment and run the model.
Prerequisite: Ensure your Python version is 3.10.
We recommend creating a virtual environment (e.g., using Conda) to manage dependencies:
conda create -n dance python=3.10
conda activate danceThen, install the necessary dependencies:
pip install -r requirements.txtPlease download the following datasets from PhysioNet:
- MIT-BIH Arrhythmia Database: https://physionet.org/content/mitdb/
- MIT-BIH Noise Stress Test Database: https://physionet.org/content/nstdb/
After downloading and unzipping, place the dataset folders in the top-level directory (DANCE/). Your project structure should look like the tree below:
DANCE/
├── mit-bih-arrhythmia-database/ <-- Place Dataset 1 here
├── mit-bih-noise-stress-test-database/ <-- Place Dataset 2 here
├── datasets/
│ ├── split_manager.py
│ └── ...
├── script/
│ └── DANCER.sh
├── requirements.txt
└── README.mdNote: Ensure the folder names match the structure above so the scripts can locate the files correctly.
Run the data manager script to preprocess and split the data:
python datasets/split_manager.pyTo run the model, execute the provided shell script:
bash script/DANCER.shAlternatively, you can modify script/DANCER.sh to customize parameters for your specific instances.
Dan Liu, Tianhai Xie @ IIP-2025