callcut.evaluation.BoundaryAccuracy🔗
- class callcut.evaluation.BoundaryAccuracy(n_matches, onset_errors_ms, offset_errors_ms)[source]🔗
Boundary (onset/offset) accuracy statistics for matched events.
Measures how accurately the predicted call boundaries match the ground truth boundaries. Only computed for matched events (true positives).
Errors are computed as
predicted - ground_truth, so:Positive onset error = prediction started too late
Negative onset error = prediction started too early
Positive offset error = prediction ended too late
Negative offset error = prediction ended too early
- Parameters:
Attributes
onset_median_ms
(float) Median onset error in milliseconds.
onset_mean_abs_ms
(float) Mean absolute onset error in milliseconds.
onset_p95_ms
(float) 95th percentile of absolute onset error in milliseconds.
offset_median_ms
(float) Median offset error in milliseconds.
offset_mean_abs_ms
(float) Mean absolute offset error in milliseconds.
offset_p95_ms
(float) 95th percentile of absolute offset error in milliseconds.
Examples
>>> import numpy as np >>> accuracy = BoundaryAccuracy( ... n_matches=50, ... onset_errors_ms=np.array([10.0, -5.0, 15.0, -8.0]), ... offset_errors_ms=np.array([20.0, -10.0, 5.0, -15.0]), ... ) >>> accuracy.onset_median_ms 2.5