deepof.post_hoc

Data structures and functions for analyzing supervised and unsupervised model results.

Functions

align_deepof_kinematics_with_unsupervised_labels(...)

Align kinematics with unsupervised labels.

annotate_time_chunks(deepof_project, ...[, ...])

Annotate time chunks produced after change-point detection using the unsupervised pipeline.

chunk_cv_splitter(chunk_stats, breaks[, n_folds])

Split a dataset into training and testing sets, grouped by video.

chunk_summary_statistics(chunked_dataset, ...)

Extract summary statistics from a chunked dataset using seglearn.

compute_UMAP(embeddings, cluster_assignments)

Compute UMAP embeddings for visualization purposes.

compute_steady_state(transition_matrices[, ...])

Compute the steady state of each transition matrix provided in a dictionary.

compute_transition_matrix_per_condition(...)

Compute the transition matrices specific to each condition.

condition_distance_binning(embedding, ...[, ...])

Compute the distance between the embeddings of two conditions, using the specified aggregation method.

enrichment_across_conditions([embedding, ...])

Compute the population of each cluster across conditions.

explain_clusters(chunk_stats, hard_counts, ...)

Compute SHAP feature importance for models mapping chunk_stats to cluster assignments.

fit_normative_global_model(...)

Fit a global model to the normal embeddings.

get_aggregated_embedding(embedding[, ...])

Aggregate the embeddings of a set of videos, using the specified aggregation method.

get_time_on_cluster(soft_counts, breaks[, ...])

Compute how much each animal spends on each cluster.

get_transitions(state_sequence, n_states)

Compute the transitions between states in a state sequence.

recluster(coordinates, embeddings[, ...])

Recluster the data using a HMM-based approach.

select_time_bin([embedding, soft_counts, ...])

Select a time bin and filters all relevant objects (embeddings, soft_counts, breaks, and supervised annotations).

separation_between_conditions(cur_embedding, ...)

Compute the distance between the embeddings of two conditions, using the specified aggregation method.

train_supervised_cluster_detectors(...[, ...])

Train supervised models to detect clusters from kinematic features.