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, soft_counts)

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

chunk_cv_splitter(chunk_stats, bin_info[, ...])

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([soft_counts, ...])

Compute the population of each cluster across conditions.

fit_normative_global_model(...)

Fit a global model to the normal embeddings.

get_contrastive_soft_counts(coordinates, ...)

Extract soft counts for contrastive model.

get_contrastive_soft_counts_gmm(coordinates, ...)

Distance/behavior-gated GMM decoder.

get_contrastive_soft_counts_msm_pcca(...[, ...])

Distance/behavior-gated MSM + PCCA with k-means microstates.

get_pairwise_distances(coordinates, window_len)

Per-window gating series: pairwise distances OR behavior-combination codes.

get_time_on_cluster(soft_counts[, ...])

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.

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.