Module cohort

Source
Expand description

Cohort-level temporal drift analytics.

Measures how a group of entities evolves collectively in embedding space, complementing the single-entity analytics in crate::calculus.

§Key metrics

MetricWhat it captures
centroid_driftHow the group center moved
dispersion_changeDid the group spread or compress?
convergence_scoreAre entities moving in the same direction?
outliersEntities drifting abnormally vs the group

Structs§

CohortDriftReport
Full cohort drift analysis between two time points.
CohortOutlier
An entity whose drift deviates significantly from the cohort.

Functions§

centroid 🔒
Compute the centroid (element-wise mean) of a set of vectors.
cohort_drift
Compute cohort-level drift analysis.
compute_convergence_score 🔒
Mean cosine similarity of all drift vectors against their mean direction.
nearest_vector_at
Find the vector closest in time to target within a trajectory.