devnums / pyheartlib

A Python package for processing electrocardiogram signals ❤️
https://pyheartlib.readthedocs.io/
GNU Affero General Public License v3.0
2 stars 1 forks source link

add legend to the paper's main figure #9

Closed LegrandNico closed 12 months ago

LegrandNico commented 1 year ago

It is unclear to me what the label represents in the paper's main figure see here. I think this one would benefit from some context about the processing pipeline and analysis goal.

For example, why are some of the R waves not labelled as True peaks when they seem normal?

What do false positive and negative mean exactly?

The prediction appears to be missing some of the R wave, is it expected or a problem?

This issue is related to the review of the package for JOSS (see here).

devnums commented 1 year ago

Thanks for the comment. I have added more information to the figure. I have also added additional figures to the repository. Please check the new figure.

The figures show the true peaks according to the manual annotations of the MIT-BIH dataset.

A false positive means that a sub-segment is predicted to contain an R-peak, but in reality it does not. The figures show that this is usually the case for nearby points close to the true R-peak. False positives are shown in orange color. When false positives are close to the true R-peaks, we can say that the prediction is right. I have calculated the results considering this fact. Results It is possible to improve detection with a post-processing algorithm in these situations. Sometimes, these false positives are caused by a small mistake in the manual annotations.

False negatives are when the model misses to detect a true R-peak.

Although this is just an example, the model predicts with high accuracy. It can be improved to achieve more accurate predictions and detect almost all of the R-peaks.