You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Effective-DOF and segmental-coupling metrics (multi-marker coordination) #358
Candidate from the stillstanding study (identity/coordination.py): inter-segment correlations along the shared sway axis, effective degrees-of-freedom via variance fraction of the first PCA component across markers, and head:hip amplitude ratio (inverted-pendulum test). Needs a full read of the source before porting; flagged borderline-general in the 2026-07 survey.
Implemented in micromotion, not here: markers are that package's domain under the four-toolbox rule, and musicalgestures/_posture.py has been a pure re-export shim since 2026-07-29. Same shape as #356.
fourMs/micromotion#3, merged — shared_axis_projection and segmental_coordination in micromotion/posture.py, reachable from MGT through the existing _posture re-export.
One of the three metrics already existed. effective_dimensionality computes the participation ratio the effective-DOF measure wants, and called with rank=False it reproduces the still-standing analysis's pc1 and eff_dof on all 81 sessions to 1e-10 — so it is called, not copied.
What was missing was the projection. principal_axis_projection gives each marker its own axis, and two markers swaying at right angles, each on its own axis, correlate perfectly while sharing no direction of motion. Correlating segments only means something once they are on one shared axis, taken from a named reference marker because the axis is anatomical.
Verified against the study that asked for it: correlations reproduce to 4e-16 on every session it produced a number for, and the amplitude ratio to 4e-16 on the 79 of 81 sessions where both hip markers are present throughout. The two that differ are exactly the two with frames where one hip drops out — a caller-side construction choice, and both are reachable.
Three things the study code did not do: correlations are pairwise-complete and each carries its own n (np.corrcoef returns NaN on one missing sample, which silently dropped 1–2 sessions per pair under a heading reporting a single N); mask makes the reference-marker masking a decision rather than an accident; and reduce keeps a derived marker wanted only for a ratio out of the dimensionality reduction, which moved eff_dof by 0.16 when it crept in.
No body-part taxonomy is built in — "inverted pendulum" is an interpretation of a ratio above one, not something this computes.
Activity
Design: the road to 2.0, and what order the open issues get closed in
alexarje commentedon Aug 24, 2026
Implemented in micromotion, not here: markers are that package's domain under the four-toolbox rule, and
musicalgestures/_posture.pyhas been a pure re-export shim since 2026-07-29. Same shape as #356.fourMs/micromotion#3, merged —
shared_axis_projectionandsegmental_coordinationinmicromotion/posture.py, reachable from MGT through the existing_posturere-export.One of the three metrics already existed.
effective_dimensionalitycomputes the participation ratio the effective-DOF measure wants, and called withrank=Falseit reproduces the still-standing analysis'spc1andeff_dofon all 81 sessions to 1e-10 — so it is called, not copied.What was missing was the projection.
principal_axis_projectiongives each marker its own axis, and two markers swaying at right angles, each on its own axis, correlate perfectly while sharing no direction of motion. Correlating segments only means something once they are on one shared axis, taken from a named reference marker because the axis is anatomical.Verified against the study that asked for it: correlations reproduce to 4e-16 on every session it produced a number for, and the amplitude ratio to 4e-16 on the 79 of 81 sessions where both hip markers are present throughout. The two that differ are exactly the two with frames where one hip drops out — a caller-side construction choice, and both are reachable.
Three things the study code did not do: correlations are pairwise-complete and each carries its own
n(np.corrcoefreturns NaN on one missing sample, which silently dropped 1–2 sessions per pair under a heading reporting a single N);maskmakes the reference-marker masking a decision rather than an accident; andreducekeeps a derived marker wanted only for a ratio out of the dimensionality reduction, which movedeff_dofby 0.16 when it crept in.No body-part taxonomy is built in — "inverted pendulum" is an interpretation of a ratio above one, not something this computes.