ethograph.labels.predictions#

Load model predictions from per-trial files and convert to label intervals.

Predictions are stored as per-trial files in a folder:
predictions_dlc2action/

dlc2action_trial1.pickle # (T, n_classes) or (T,) dlc2action_trial2.npy

If shape (T, n_classes): softmax probabilities → labels via argmax, confidence via 1-entropy. If shape (T,): dense labels directly, no confidence available.

Classes

PredictionsStore

Lazy per-trial loader for a predictions folder.

Functions

load_prediction_file

Load a prediction file (.npy or .pickle).

prediction_to_labels_and_confidence

Convert prediction array to dense labels and optional confidence.