deepof.annotation_utils.immobility
- deepof.annotation_utils.immobility(X_huddle: ndarray, huddle_estimator: Pipeline, animal_id: str = '', median_filter_width: int = 11, min_immobility: int = 25, max_immobility: int = 3000) array
Return true when the mouse is huddling a pretrained model.
- Parameters:
X_huddle (pandas.DataFrame) – mouse features over time.
huddle_estimator (sklearn.pipeline.Pipeline) – pre-trained model to predict feature occurrence.
animal_id (str) – indicates the animal to sniff. Must be one of animal_ids.
median_filter_width (int) – width of median filter for smoothing results
min_immobility (int) – minimum length of behavior to be considered immobility
max_immobility (int) – maximum length of behavior to be considered immobility (longer is labeled as “sleeping”)
- Returns:
1 if the animal is huddling, 0 otherwise
- Return type:
y_huddle (np.array)