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_frames
int Total number of frames evaluated.
- tp
int True positives (call frames correctly predicted as calls).
- fp
int False positives (non-call frames incorrectly predicted as calls).
- fn
int False negatives (call frames incorrectly predicted as non-calls).
- tn
int True negatives (non-call frames correctly predicted as non-calls).
- precision
float Precision = TP / (TP + FP).
- recall
float Recall = TP / (TP + FN).
- f1
float F1 score = 2 * precision * recall / (precision + recall).
- n_frames
Examples
>>> metrics = FrameMetrics( ... n_frames=1000, ... tp=150, ... fp=20, ... fn=30, ... tn=800, ... precision=0.882, ... recall=0.833, ... f1=0.857, ... )