BPointExtractionForouzanfar2018#
- class pepbench.algorithms.icg.BPointExtractionForouzanfar2018(scaling_factor: float = 2000, correct_outliers: bool | None = False, handle_missing_events: Literal['raise', 'warn', 'ignore'] = 'warn')[source]#
B-point extraction algorithm by Forouzanfar et al. (2018).
This algorithm extracts B-points based on the detection of the most prominent monotonic increasing segment between the A-Point (the local minimum within one third of the beat-to-beat interval prior to the C-Point) and the C-Point. The B-Point is then detected as the last zero crossing or local maximum of the third derivative of the ICG signal within the segment.
For more information, see [For18].
References
[For18]Forouzanfar, M., Baker, F. C., De Zambotti, M., McCall, C., Giovangrandi, L., & Kovacs, G. T. A. (2018). Toward a better noninvasive assessment of preejection period: A novel automatic algorithm for B-point detection and correction on thoracic impedance cardiogram. Psychophysiology, 55(8), e13072. https://doi.org/10.1111/psyp.13072
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__(scaling_factor: float = 2000, correct_outliers: bool | None = False, handle_missing_events: Literal['raise', 'warn', 'ignore'] = 'warn')[source]#
Initialize new
BPointExtractionForouzanfar2018instance.In the original paper, the authors report the sampling frequency of the ICG signal as the scaling factor. Since this would change the algorithm behavior depending on the sampling rate of the ICG signal, this implementation introduces a scaling factor that can be set by the user. By default, the scaling factor is set to 2000 (corresponding to a sampling rate of the original data of 2000 Hz) instead of using the sampling rate of the ICG signal.
- Parameters:
- scaling_factorfloat, optional
Scaling factor for the B-point extraction algorithm. Default: 2000.
- correct_outliersbool, optional
True to correct outliers, False to set the B-point to NaN if no monotonic segment is found. Default: False.
- handle_missing_eventsone of {“warn”, “raise”, “ignore”}, optional
How to handle failing event extraction. Must be one of:
"warn": issue a warning and set the event to NaN,"raise": raise anEventExtractionError, or"ignore": continue silently.
Default:
"warn".
- extract(*, icg: _IcgRawDataFrame | DataFrame, heartbeats: _HeartbeatSegmentationDataFrame | DataFrame, c_points: _CPointDataFrame | DataFrame, sampling_rate_hz: float | None)[source]#
Extract B-points from given ICG derivative signal.
The algorithm extracts B-points based on the detection of the most prominent monotonic increasing segment between the A-Point (the local minimum within one third of the beat-to-beat interval prior to the C-Point) and the C-Point. The B-Point is then detected as the last zero crossing or local maximum of the third derivative of the ICG signal within the segment.
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.