ethograph.labels.predictions#

Read a ethograph.segment.inference prediction folder.

One run, one folder, beside the session’s own labels/ (see ethograph.labels.onset_curves for the sibling convention the LightGBM lightgbm model uses):

labels/
    predictions_{run_name}_{timestamp}/
        {stem}_predictions.tsv   # real intervals, per-segment confidence, labeling_method
        {stem}_probs.npz         # per (trial, individual): "{key}" -> (T, C) probs, "{key}_time" -> (T,)

The TSV needs no reconstruction — it is already the GUI’s native labels format. Only the frame-by-frame confidence curve (for the review overlay) is read from the .npz, one array at a time.

Classes

PredictionsStore

Read one ethograph.segment.inference prediction folder.

Functions

prediction_to_labels_and_confidence

Convert prediction array to dense labels and optional confidence.