Takes data from the atrial fibrillation database from Physionet, and attempts to detect that atrial fibrillation using a number of statistical methods. Matlab code
The data sets used this code can be found at: http://www.physionet.org/physiobank/database/afdb/
- The original code was written so long ago that it did not run on Matlab 2018 Here is the solution for Matlab 2018. Tested on Matlab 2018 of MacOS Mojave and Windows 10. Please tell me if you have run successfully in other operating system.
- Clone or download this repository
- Install the WFDB Application Toolbox
- Go to mcode directory on MATLAB
- Type addpath(pwd); savepath;
- You can see this instruction from README.txt in mcode directory too
- Run loadData.m
- This may take a while as it downloads the dataset from physionet.
- Run dataTest.m
- Change the treshold values to see if anything good happens!
- List of the threshold in the code.
- THR_TPR
- THR_SE
- THR_RMSSD
- The screenshot of the prediction result is saved in the screenshot directory automatically. So feel free to check!
- testAll.m tests AF detection while changing the threshold values. This may take a long time.