a b/featurebased-approach/README.md
1
# Feature-based approach
2
3
This approach makes use of several previously described heart rate variability metrics, morphological features and signal quality indices. After extracting features, two classifiers are trained,namely, an ensemble of bagged trees (50 trees) and multilayer perceptron (2-layer, 10 hidden neurons, feed-forward).
4
5
## Dependencies
6
7
This code was tested on Matlab R2017a (Version 9.2) with the [WFDB Toolbox for Matlab/Octave v0.9.8](https://physionet.org/physiotools/matlab/wfdb-app-matlab/) as the only dependency. Please refer to the toolbox's website for how to install.
8
9
## Getting started
10
11
The following steps are necessary to perform the feature-based arrhythmia detection.
12
13
1. `ExtractFeatures()` performs feature extraction for each record within a folder
14
15
2. `TrainClassifier()` trains an Ensemble of Bagged Decision Trees and Multilayer Perceptron Classifier to classify segments of ECG into the defined categories. Saves resulting classifiers for future usage
16
17
3. `PredictTestSet()` makes use of pre-trained classifiers to produce results on test set
18
19
20
## Description of approach
21
22
The feature extraction procedure is divided in the following stages:
23
24
### Preprocessing
25
26
10th order bandpass Butterworth filters with cut-off frequencies 5-45Hz (narrow band) and 1-100Hz (wide band)
27
28
### QRS detection
29
We used four well-known QRS detectors: 
30
31
- gqrs (WFDB Toolbox)
32
- Pan-Tompkins (FECGSYN) 
33
- Maxima Search (OSET/FECGSYN)
34
- matched filtering
35
36
A consensus based on kernel density estimation is output as final decision.
37
38
### Feature Extraction
39
40
| Type  | Examples | Number |
41
| -------- | ------------------- | ----:|
42
| Time Domain | SDNN, RMSSD, NNx | 8 |
43
| Frequency Domain | LF power, HF power, LF/HF | 8 |
44
| Non-linear Features | SampEn, ApEn, Poincaré plot, Recurrence Quantification Analysis | 95 |
45
| Signal Quality | bSQI, iSQI, kSQI, rSQI | 36 |
46
| Morphological Features | P-wave power, T-wave power, QT interval | 22 |
47
|  | Total | 169 |
48
49