BPointExtractionArbol2017SecondDerivative#
- class pepbench.algorithms.icg.BPointExtractionArbol2017SecondDerivative(search_window_start_ms: int | None = 150, window_size_ms: int | None = 50, handle_missing_events: Literal['raise', 'warn', 'ignore'] = 'warn')[source]#
B-point extraction algorithm by Arbol et al. (2017) based on the second derivative of the ICG signal.
This algorithm extracts B-points based on the maximum of the second derivative of the ICG signal in a 50ms window, starting 150ms before the C-point.
For more information, see [Arb17].
References
[Arb17]Árbol, J. R., Perakakis, P., Garrido, A., Mata, J. L., Fernández-Santaella, M. C., & Vila, J. (2017). Mathematical detection of aortic valve opening (B point) in impedance cardiography: A comparison of three popular algorithms. Psychophysiology, 54(3), 350-357. https://doi.org/10.1111/psyp.12799
Methods
clone()Create a new instance of the class with all parameters copied over.
extract(*, icg, heartbeats, c_points, ...)Extract B-points from given ICG derivative signal.
get_params([deep])Get parameters for this algorithm.
set_params(**params)Set the parameters of this Algorithm.
- __init__(search_window_start_ms: int | None = 150, window_size_ms: int | None = 50, handle_missing_events: Literal['raise', 'warn', 'ignore'] = 'warn')[source]#
Initialize new
BPointExtractionArbol2017SecondDerivativealgorithm instance.- Parameters:
- search_window_start_msint, optional
Start of the search window in which the algorithm searches for the B-point, relative to the C-point. Default: 150 ms (see Arbol 2017)
- window_size_msstr, int
Size of the search window in which the algorithm searches for the B-point. Default: 50 ms (see Arbol 2017)
- 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”
- extract(*, icg: _IcgRawDataFrame | DataFrame, heartbeats: _HeartbeatSegmentationDataFrame | DataFrame, c_points: _CPointDataFrame | DataFrame, sampling_rate_hz: float)[source]#
Extract B-points from given ICG derivative signal.
This algorithm extracts B-points based on the maximum of the second derivative of the ICG signal in a 50ms window, starting 150ms before the C-point.
The results are saved in the
points_attribute of the super class.- Parameters:
- icg
DataFrame ICG derivative signal
- heartbeats
DataFrame Segmented heartbeats. Each row contains start, end, and R-peak location (in samples from beginning of signal) of that heartbeat, index functions as id of heartbeat
- c_points
DataFrame Extracted C-points. Each row contains the C-point location (in samples from beginning of signal) for each heartbeat, index functions as id of heartbeat. C-point locations can be NaN if no C-points were detected for certain heartbeats
- sampling_rate_hzint
sampling rate of ICG derivative signal in hz
- icg
- Returns:
- self
- Raises:
EventExtractionErrorIf the event extraction fails and
handle_missingis set to “raise”
- 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
- 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.