CPointExtractionScipyFindPeaks#
- class pepbench.algorithms.icg.CPointExtractionScipyFindPeaks(window_c_correction: int = 3, handle_missing_events: Literal['raise', 'warn', 'ignore'] = 'warn')[source]#
C-point extraction algorithm using
find_peaks.This algorithm extracts C-points based on the maximum of the most prominent peak in the ICG derivative signal using the
find_peaksfunction.Methods
clone()Create a new instance of the class with all parameters copied over.
extract(*, icg, heartbeats, sampling_rate_hz)Extract C-points from given cleaned ICG derivative signal using
find_peaks.get_params([deep])Get parameters for this algorithm.
set_params(**params)Set the parameters of this Algorithm.
- __init__(window_c_correction: int = 3, handle_missing_events: Literal['raise', 'warn', 'ignore'] = 'warn')[source]#
Initialize new
CPointExtractionScipyFindPeaksinstance.- Parameters:
- window_c_correctionint, optional
Number of preceding heartbeats taken into account for C-point correction (using mean R-C-distance). Default: 3
- handle_missing_eventsone of {“warn”, “raise”, “ignore”}, optional
- How to handle failing event extraction. Can be one of:
“warn”: issue a warning and set the event to NaN
“raise”: raise an
EventExtractionError“ignore”: ignore the error and continue with the next event
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(*, icg: _IcgRawDataFrame | DataFrame, heartbeats: _HeartbeatSegmentationDataFrame | DataFrame, sampling_rate_hz: float | None)[source]#
Extract C-points from given cleaned ICG derivative signal using
find_peaks.The C-point is detected as the maximum of the most prominent peak in the ICG derivative signal within each segmented heartbeat.
The resulting C-points are saved in the ‘points_’ attribute of the class instance.
- Parameters:
- Returns:
- self
- 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.