This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
CLOCS is a patient-specific contrastive learning method that can be used to pre-train neural networks on medical time-series data. It can improve the generalization performance of such networks when trained and deployed on downstream supervised tasks with limited labelled data.
This repository contains a PyTorch implementation of CLOCS. For details, see CLOCS: Contrastive Learning of Cardiac Signals Across Space, Time, and Patients. [ICML paper] [blogpost] [video]
The CLOCS code requires the following:
- Python 3.6 or higher
- PyTorch 1.0 or higher
The datasets can be downloaded from the following links:
In order to pre-process the datasets appropriately for CLOCS and the downstream supervised tasks, please refer to the following repository
To train the model(s) in the paper, run this command:
python run_experiments.py
To evaluate the model(s) in the paper, run this command:
python run_experiments.py
If you use our code in your research, please consider citing with the following BibTex.
@inproceedings{kiyasseh2021clocs,
title={Clocs: Contrastive learning of cardiac signals across space, time, and patients},
author={Kiyasseh, Dani and Zhu, Tingting and Clifton, David A},
booktitle={International Conference on Machine Learning},
pages={5606--5615},
year={2021},
organization={PMLR}
}