Prediction window and confidence from variability rather than a fixed spread #11

Closed
opened 2026-08-18 03:04:45 -05:00 by null · 0 comments
Owner

The baseline derives its window from the median absolute deviation alone and clamps it between 1 and 10 days. §12 step 5 asks for the window to come from the user's own variability and from recent prediction error — the second is the part that makes the app learn from being wrong, and the baseline ignores it entirely even though PredictionRecord already stores every scored error.

Build:

  • window half-width from a robust variability estimate (MAD) combined with recent absolute prediction error
  • confidence from what §15 lists: number of confirmed cycles, their variability, recency, questionable gaps, stability of the recent pattern, historical accuracy, count of "Not yet" observations, and whether the model is extrapolating beyond its normal range

The rule that decides the arguments, from §15: do not assign High purely because the user has entered a large number of cycles. A user with 25, 33, 28, 37, 26, 32 has plenty of data and an unpredictable cycle; telling them the forecast is High is the failure. Agreement dominates, volume only caps.

This needs the engine to see scored PredictionRecords, which means a signature change — feed recent errors in rather than letting domain/prediction reach for storage it must not know about.

Verify: the §15 worked examples are tests — a stable 28/29 history reads High with a tight window, and the 25/33/28/37/26/32 history reads Low with a wide one — and a user whose recent predictions were wrong gets a wider window than one whose were right, with identical cycle histories.

The baseline derives its window from the median absolute deviation alone and clamps it between 1 and 10 days. §12 step 5 asks for the window to come from the user's own variability **and** from recent prediction error — the second is the part that makes the app learn from being wrong, and the baseline ignores it entirely even though `PredictionRecord` already stores every scored error. Build: - window half-width from a robust variability estimate (MAD) combined with recent absolute prediction error - confidence from what §15 lists: number of confirmed cycles, their variability, recency, questionable gaps, stability of the recent pattern, historical accuracy, count of "Not yet" observations, and whether the model is extrapolating beyond its normal range The rule that decides the arguments, from §15: **do not assign High purely because the user has entered a large number of cycles.** A user with 25, 33, 28, 37, 26, 32 has plenty of data and an unpredictable cycle; telling them the forecast is High is the failure. Agreement dominates, volume only caps. This needs the engine to see scored `PredictionRecord`s, which means a signature change — feed recent errors in rather than letting `domain/prediction` reach for storage it must not know about. Verify: the §15 worked examples are tests — a stable 28/29 history reads High with a tight window, and the 25/33/28/37/26/32 history reads Low with a wide one — and a user whose recent predictions were wrong gets a wider window than one whose were right, with identical cycle histories.
null added this to the Batch 02 — Prediction Engine milestone 2026-08-18 03:04:45 -05:00
null closed this issue 2026-08-18 03:16:15 -05:00
Sign in to join this conversation.
No Label
P0
P1
P2
release-blocker
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: null/Privacy-Period-Tracker#11
No description provided.