QPeakExtractionVanLien2013#
- class pepbench.algorithms.ecg.QPeakExtractionVanLien2013(time_interval_ms: int = 40, handle_missing_events: Literal['raise', 'warn', 'ignore'] = 'warn')[source]#
Algorithm to extract Q-peaks based on the detection of the R-peak, as suggested by Van Lien et al. (2013).
The Q-peak is estimated by subtracting a fixed time interval from the R-peak location. The fixed time interval is defined by the parameter
time_interval.For more information on the algorithm, see [Van13].
References
[Van13]Van Lien, R., Schutte, N. M., Meijer, J. H., & De Geus, E. J. C. (2013). Estimated preejection period (PEP) based on the detection of the R-peak and dZ/dt-min peaks does not adequately reflect the actual PEP across a wide range of laboratory and ambulatory conditions. International Journal of Psychophysiology, 87(1), 60-69. https://doi.org/10.1016/j.ijpsycho.2012.11.001
Methods
clone()Create a new instance of the class with all parameters copied over.
extract(*, ecg, heartbeats, sampling_rate_hz)Extract Q-peaks from given ECG signal.
get_params([deep])Get parameters for this algorithm.
set_params(**params)Set the parameters of this Algorithm.
- __init__(time_interval_ms: int = 40, handle_missing_events: Literal['raise', 'warn', 'ignore'] = 'warn')[source]#
Initialize new
QPeakExtractionVanLien2013algorithm instance.- Parameters:
- time_interval_msint, optional
Specify the constant time interval in milliseconds which will be subtracted from the R-peak for Q-peak estimation. Default: 40 ms
- handle_missing_eventsone of {“warn”, “raise”, “ignore”}, optional
How to handle missing data in the input dataframes. Default: “warn”
- clone() Self[source]#
Create a new instance of the class with all parameters copied over.
This will create a new instance of the class itself and all nested objects
- extract(*, ecg: _EcgRawDataFrame | DataFrame | None, heartbeats: _HeartbeatSegmentationDataFrame | DataFrame, sampling_rate_hz: float)[source]#
Extract Q-peaks from given ECG signal.
The results are saved in the
points_attribute of the super class.- Parameters:
- ecg: :class:`~pandas.DataFrame`
ECG signal. Not used in this function since Q-peak is estimated from the R-peaks in the
heartbeatsDataFrame.- heartbeats: :class:`~pandas.DataFrame`
DataFrame containing one row per segmented heartbeat, each row contains start, end, and R-peak location (in samples from beginning of signal) of that heartbeat, index functions as id of heartbeat
- sampling_rate_hz: int
Sampling rate of ECG signal in hz
- Returns:
- self
- Raises:
EventExtractionErrorIf the event extraction fails and
handle_missingis set to “raise”
- get_params(deep: bool = True) dict[str, Any][source]#
Get parameters for this algorithm.
- Parameters:
- deep
Only relevant if object contains nested algorithm objects. If this is the case and deep is True, the params of these nested objects are included in the output using a prefix like
nested_object_name__(Note the two “_” at the end)
- Returns:
- params
Parameter names mapped to their values.