callcut.evaluation.FrameMetrics🔗

class callcut.evaluation.FrameMetrics(n_frames, tp, fp, fn, tn, precision, recall, f1)[source]🔗

Frame-level detection metrics.

These metrics evaluate detection at the individual frame level: each frame is classified as either containing a call or not.

Parameters:
n_framesint

Total number of frames evaluated.

tpint

True positives (call frames correctly predicted as calls).

fpint

False positives (non-call frames incorrectly predicted as calls).

fnint

False negatives (call frames incorrectly predicted as non-calls).

tnint

True negatives (non-call frames correctly predicted as non-calls).

precisionfloat

Precision = TP / (TP + FP).

recallfloat

Recall = TP / (TP + FN).

f1float

F1 score = 2 * precision * recall / (precision + recall).

Examples

>>> metrics = FrameMetrics(
...     n_frames=1000,
...     tp=150,
...     fp=20,
...     fn=30,
...     tn=800,
...     precision=0.882,
...     recall=0.833,
...     f1=0.857,
... )