aps_compute_data_axis_weights
Compute normalized D-axis contribution weights from AccessReceipt records using role, recency decay, and content length. Returns 6-digit decimal weights summing to ~1.0 for attribution.
Instructions
Compute the D-axis fractional weight vector from a list of AccessReceipt records with role, timestamp, and content length. Returns canonical DataAxisEntry[] with 6-digit decimal contribution_weight strings that sum to ~1.0 and feed directly into aps_construct_attribution_primitive. Empty input → empty array; all-zero raw weights → error. Weights = role × recency_decay × length_weight, normalized per spec BUILD-B §'The D-axis formula'. Parameter names match the SDK: sources, action_timestamp, optional profile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sources | Yes | Per-source records with retrieval metadata | |
| action_timestamp | Yes | ISO-8601 UTC ms when the action ran (t_action) | |
| profile | No | Optional WeightProfile override; defaults to DEFAULT_WEIGHT_PROFILE |