CorrelationStrategy with Spearman, and MoonPhase as a control #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
The tracer for ADR 0006. One
CorrelationStrategyend to end — Spearman — scoringMetricKinds againstDayMood, plus the display contract that every later strategy inherits.CorrelationStrategyis a closed enum. Every strategy returns the same shape, because the point of having several is that they are directly comparable; heterogeneous results would defeat it.Spearman first because
Moodis ordinal. The domain asserts Rad is better than Good but never that the gap from Awful to Bad equals the gap from Good to Rad, which is exactly what Pearson assumes.MoonPhaseships here, derived fromDateon read and never stored — it is a function of the calendar, not an observation, so there is nothing to persist and no value that can go stale. It earns its place as a control: a strategy set reporting a strong lunar effect is reporting its own false-positive rate. It is also, straightforwardly, fun.The display contract is the constraint, and it is deliberate. Results are not ranked, not badged with significance, and not surfaced as an insights feed. Ranking by strength selects precisely for whichever metric got lucky, and a significance badge converts a coincidence into a claim someone may act on. Show the coefficient with its sample size and let the User read it as exploration.
A minimum sample size gates output entirely: below it, return nothing rather than a coefficient built from a handful of days. That threshold is configuration, not a constant.
Acceptance criteria
CorrelationStrategyis a closed enum; Spearman is implementedMetricKinds againstDayMood, one point perDateDatewith several entries contributes one point, not one per entryMoonPhasederives fromDate, is never stored, and is correlated like any other inputBlocked by