Machine Learning and Cardiology
Heartbeat Classification - Results
Type 1 classifies whether a hearbeat is healthy or ill.
Type 2 classifies the
kind of illness.
8.1 Slope Features - whole heartbeat
When using 10 dimensions, results seem to be the best: 83% for Type 1 and 94% for Type 2. Increasing k doesn't seem to affect too much these results, but one can expect that the accuracy will drop when increasing k too much.
Although the accuracy of this approach seems to be superior to the other approaches, the ratio of False Negatives is not the lowest one: in 37% of the error cases, ill heartbeats are classified as healthy.
| 10 dimensions | 100 dimensions | ||||
|---|---|---|---|---|---|
| k-NN | Type | Accuracy | Std. Error | Accuracy | Std. Error |
| 1 | 1 | 0.83 | 0.10 | 0.88 | 0.07 |
| 2 | 0.94 | 0.04 | 0.93 | 0.04 | |
| 2 | 1 | 0.83 | 0.10 | 0.88 | 0.07 |
| 2 | 0.94 | 0.04 | 0.93 | 0.04 |
8.2 Slope Features - QRS complex
Using the QRS-complex in stead of the whole heartbeat seems to perform better: an accurracy of 86 and 93% are achieved when using 100 dimensions.
| 10 dimensions | |||||
|---|---|---|---|---|---|
| k-NN | Type | Accuracy | Std. Error | Type 1 Error | Type 2 Error |
| 1 | 1 | 0.81 | 0.10 | 0.03 ± 0.00 | 0.40 ± 0.05 |
| 2 | 0.94 | 0.05 | |||
| 100 dimensions | |||||
|---|---|---|---|---|---|
| k-NN | Type | Accuracy | Std. Error | Type 1 Error | Type 2 Error |
| 1 | 1 | 0.86 | 0.08 | 0.03 ± 0.00 | 0.32 ± 0.05 |
| 2 | 0.93 | 0.06 | |||
8.3 Fourier Features
As can be seen in the results, for 1-NN, this approach yields the best results when we keep 3 fourier magnitues: an accurracy of 83% for type 1, and 88% of type 2. A better accuracy for type 2 might even be achieved when only keeping two fourier features.
| Features | k-NN | Type | Accuracy | Std. Error | Type 1 Error | Type 2 Error |
|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 0.78 | 0.07 | 0.10 ± 0.01 | 0.44 ± 0.04 |
| 2 | 0.85 | 0.03 | ||||
| 2 | 1 | 0.78 | 0.07 | 0.10 ± 0.01 | 0.44 ± 0.04 | |
| 2 | 0.85 | 0.03 | ||||
| 2 | 1 | 1 | 0.78 | 0.09 | 0.08 ± 0.01 | 0.43 ± 0.05 |
| 2 | 0.89 | 0.03 | ||||
| 2 | 1 | 0.78 | 0.09 | 0.08 ± 0.01 | 0.43 ± 0.05 | |
| 2 | 0.89 | 0.03 | ||||
| 3 | 1 | 1 | 0.83 | 0.07 | 0.07 ± 0.01 | 0.38 ± 0.04 |
| 2 | 0.88 | 0.04 | ||||
| 4 | 1 | 1 | 0.83 | 0.07 | 0.06 ± 0.01 | 0.38 ± 0.04 |
| 2 | 0.88 | 0.06 | ||||
| 5 | 1 | 1 | 0.82 | 0.05 | 0.06 ± 0.01 | 0.40 ± 0.03 |
| 2 | 0.88 | 0.06 |
8.4 Polynomial Features
When only keeping 2 polynomial features, we achieve the best results for 4-NN: an accuracy of 84% for type 1, and even 90% for type 2. When keeping 3 polynomial features, the accuracy for type 1 and 2 drops in the best case to 83 resp 88% (6-NN). It is clear that it is important to use only a very select amount of features of one type, in order to increase overall accuracy. We can conclude that all approaches yield quite the same accuracy around 85-90%.
| Features | k-NN | Type | Accuracy | Std. Error | Type 1 Error | Type 2 Error |
|---|---|---|---|---|---|---|
| 2 | 1 | 1 | 0.84 | 0.09 | 0.05 ± 0.05 | 0.35 ± 0.05 |
| 2 | 0.89 | 0.05 | ||||
| 2 | 1 | 0.84 | 0.09 | 0.05 ± 0.01 | 0.35 ± 0.05 | |
| 2 | 0.84 | 0.09 | ||||
| 3 | 1 | 0.83 | 0.09 | 0.06 ± 0.01 | 0.36 ± 0.05 | |
| 2 | 0.90 | 0.05 | ||||
| 4 | 1 | 0.84 | 0.08 | 0.06 ± 0.01 | 0.34 ± 0.04 | |
| 2 | 0.90 | 0.05 | ||||
| 5 | 1 | 0.81 | 0.08 | 0.09 ± 0.02 | 0.40 ± 0.04 | |
| 2 | 0.89 | 0.04 | ||||
| 6 | 1 | 0.83 | 0.07 | 0.07 ± 0.01 | 0.35 ± 0.05 | |
| 2 | 0.90 | 0.05 | ||||
| 7 | 1 | 0.82 | 0.09 | 0.08 ± 0.02 | 0.38 ± 0.05 | |
| 2 | 0.87 | 0.08 | ||||
| 8 | 1 | 0.83 | 0.08 | 0.07 ± 0.01 | 0.36 ± 0.05 | |
| 2 | 0.89 | 0.07 | ||||
| 9 | 1 | 0.84 | 0.07 | 0.07 ± 0.01 | 0.36 ± 0.04 | |
| 2 | 0.87 | 0.06 | ||||
| 10 | 1 | 0.84 | 0.07 | 0.08 ± 0.02 | 0.35 ± 0.05 | |
| 2 | 0.89 | 0.06 | ||||
| 3 | 1 | 1 | 0.82 | 0.07 | 0.08 ± 0.01 | 0.39 ± 0.04 |
| 2 | 0.88 | 0.04 | ||||
| 2 | 1 | 0.82 | 0.07 | 0.08 ± 0.01 | 0.39 ± 0.04 | |
| 2 | 0.88 | 0.04 | ||||
| 3 | 1 | 0.81 | 0.07 | 0.10 ± 0.01 | 0.41 ± 0.04 | |
| 2 | 0.86 | 0.05 | ||||
| 4 | 1 | 0.82 | 0.07 | 0.09 ± 0.01 | 0.39 ± 0.04 | |
| 2 | 0.88 | 0.04 | ||||
| 5 | 1 | 0.82 | 0.06 | 0.10 ± 0.01 | 0.39 ± 0.04 | |
| 2 | 0.87 | 0.02 | ||||
| 6 | 1 | 0.83 | 0.06 | 0.10 ± 0.01 | 0.37 ± 0.04 | |
| 2 | 0.88 | 0.04 | ||||
| 7 | 1 | 0.81 | 0.07 | 0.11 ± 0.02 | 0.40 ± 0.04 | |
| 2 | 0.86 | 0.06 | ||||
| 8 | 1 | 0.83 | 0.06 | 0.10 ± 0.02 | 0.36 ± 0.03 | |
| 2 | 0.88 | 0.03 |