Metrics¶
- compute_control_metrics(time: list, bis: list, phase: str = 'maintenance', start_step: float = 600, end_step: float = 1200)¶
Compute metrics for closed loop anesthesia.
This function compute the control metrics initially proposed in [Ionescu2008].
- Parameters:
- timelist
List of time value (s).
- bislist
List of BIS value over time.
- phasestr, optional
Control phase, can be “maintenance”, ‘induction” or “total”. The default is ‘maintenance’.
- start_step: float, optional
Start time of the step disturbance, for maintenance and total phase. The default is 600s.
- end_step: float, optional
End time of the step disturbance, for maintenance and total phase. The default is 1200s.
- Returns:
- dfpd.DataFrame
DataFrame containing the computed metrics:
TT (float): Observed time-to-target (in minutes) required for reaching the target interval [55, 45] BIS.
BIS_NADIR (float): For “induction” or “total” phase. Lowest observed BIS during induction.
ST10 (float): For “induction” or “total” phase. Settling time (in minutes) within ±5 BIS (45–55 BIS range).
ST20 (float): For “induction” or “total” phase. Settling time (in minutes) within ±10 BIS (40–60 BIS range).
US (float): For “induction” or “total” phase. Undershoot below the lower BIS limit (45 BIS).
TTp (float): Time-to-target (in minutes) after a positive step disturbance.
BIS_NADIRp (float): For “maintenance” or “total” phase. Minimum BIS after a positive disturbance.
TTpn (float): For “maintenance” or “total” phase. Time-to-target after a negative disturbance.
BIS_NADIRn (float): For “maintenance” or “total” phase. Maximum BIS after a negative disturbance.
References
[Ionescu2008]C. M. Ionescu, R. D. Keyser, B. C. Torrico, T. D. Smet, M. M. Struys, and J. E. Normey-Rico, “Robust Predictive Control Strategy Applied for Propofol Dosing Using BIS as a Controlled Variable During Anesthesia,” IEEE Transactions on Biomedical Engineering, vol. 55, no. 9, pp. 2161–2170, Sep. 2008, doi: 10.1109/TBME.2008.923142.
- intergal_absolut_error(time: list, bis: list, bis_target: float = 50)¶
Compute the integral of the absolute error.
This function compute the integral of the absolute error between the BIS value and the target value.
- Parameters:
- timelist
List of time value (s).
- bislist
List of BIS value over time.
- bis_targetfloat, optional
Target BIS value. The default is 50.
- Returns:
- IAEfloat
Integral of the absolute error.
- new_metrics_induction(time: ndarray, bis: ndarray)¶
This function compute the metrics proposed in [Aubouin2024] for closed-loop anesthesia.
- Parameters:
- timelist
List of time value (s).
- bislist
List of BIS value over time.
- Returns:
- dfpd.DataFrame
Dataframe containing the computed metrics:
IAE (float): Integral of the absolute error.
Sleep_Time (float): Time to reach BIS < 60 and stay below 60 (minutes).
Low BIS time (float): Time passed with BIS < 40 (seconds).
Lowest BIS (float): Lowest BIS value.
Settling time (float): Time to reach BIS < 60 and stay within [40, 60] (minutes).
References
[Aubouin2024]B. Aubouin–Pairault, M. Fiacchini, and T. Dang, “Online identification of pharmacodynamic parameters for closed-loop anesthesia with model predictive control,” Computers & Chemical Engineering, vol. 191, p. 108837, Dec. 2024, doi: 10.1016/j.compchemeng.2024.108837.
- new_metrics_maintenance(time: ndarray, bis: ndarray)¶
Compute new metrics for maintenance of closed loop anesthesia.
- Parameters:
- timelist
List of time value (s).
- bislist
List of BIS value over time.
- Returns:
- dfpd.DataFrame
Dataframe containing the computed metrics:
IAE (float): Integral of the absolute error.
Time out of range (float): Time passed with BIS out of [40, 60] (seconds).
Lowest BIS (float): Lowest BIS value.
Highest BIS (float): Highest BIS value.