Skip to content

[Canonical owner] Add static covariance-standardization kernel for TEPP TIPREDVARstd migration #1720

Description

@seonghobae

Ownership defect

TEPP PR #475 currently adds scalar TIPREDVARstd = (1/sqrt(v)) * v * (1/sqrt(v)) inside crates/psychometric_core/src/event_time.rs. The arithmetic is static covariance/correlation standardization; its only TEPP-specific behavior is an EventTime admission check. Under the current TEPP/fast-mlsirm Context Map, reusable static psychometric arithmetic belongs here and TEPP should retain only temporal/event policy plus an ACL/adapter.

Source evidence to preserve from TEPP #475 (d99d9460ea86ba48cd5e6b4eec1efe6682d1b904): Driver, Oud, & Voelkle (2017) Table 3/p.13 identify TIPREDVAR; the 2017-era ctsem summary path forms the standardized matrix from inverse marginal standard deviations; scalar positive variance yields 1; zero variance is not standardizable; unstandardized TIPREDVAR, MANIFESTVARstd, and addedTIPREDVAR remain distinct named quantities even when scalar values coincide.

Required owner implementation

Implement a formulation-neutral Rust static covariance-standardization primitive in mlsirm-core rather than a TEPP/ctsem-name-specific temporal function. The public contract should:

  • take a finite strictly positive variance for the scalar reference path and return its standardized self-correlation using arithmetic, not a hard-coded constant;
  • fail closed for zero, negative, NaN and infinity;
  • preserve a deterministic CPU f64 reference;
  • define a matrix-compatible extension contract for D^{-1/2} Sigma D^{-1/2} without conflating covariance identity with a temporal state equation;
  • carry recovery/property tests including scale invariance across several positive magnitudes and malformed numeric inputs;
  • expose a versioned contract that TEPP can consume through an ACL once released;
  • keep ctsem-specific names and EventTime admission outside the reusable numerical kernel.

TEPP migration acceptance

After this owner implementation is merged and versioned/released, TEPP should replace the local static arithmetic with a temporal adapter that (1) enforces event-time semantics, (2) calls the released fast-mlsirm contract, (3) proves parity against the preserved #475 fixtures, and (4) removes the duplicate local production source. Until then TEPP #475 must not become production authority.

This is canonical-owner work, not a request to copy TEPP source verbatim.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions