Models, first layer: artist × DR channel × week panel with IFPI chart history; NB and logit direct h-step models, Kalman artist form, persistence/popularity baselines; walk-forward backtest (docs/BACKTEST.md) and the ranking (forecasts table)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 02:08:48 +00:00
co-authored by Claude Opus 5.5
parent 6272fbd75d
commit eededc7571
12 changed files with 1318 additions and 1 deletions
+35
View File
@@ -47,3 +47,38 @@ The same way trading models are tested:
- list lifetimes from DR's 52-week artist histories.
3. **Baselines**, then **survival models** for list lifetime, and **Hawkes / renewal models** for play times.
4. **Cross-station** models once there are a few months of data.
## What is built (src/model)
The first layer follows the design doc's "model we can build now": an **artist × DR channel × week** panel from the DR artist pages (52 Monday–Sunday weeks; the week still running when the pages were read is left out), joined to IFPI chart history by artist name. A chart week counts as known one week after it ends.
```
airplay model panel what the panel holds, rotation thresholds
airplay model backtest [--h 1,4,8] [--refit 1] walk-forward backtest -> docs/BACKTEST.md, backtest_scores
airplay model rank [--h 4] [--max-h 12] [--top 50] the ranking for h = 1..12 -> forecasts
```
- **"In rotation"** = at least τ_c plays in the week. τ_c is the 75th percentile of each channel's non-zero artist-weeks, and at least 3. It is to be recalibrated on the parsed Friday lists.
- **Features** use only what was known at the end of the origin week:
- lagged plays on the channel and on the other channels, and weeks since last played;
- Track Top-40 and Airplay Top-20 status, recency of the latest chart entry, career chart hits;
- from the artist page: Danish, group, gender, career years;
- Christmas, Danish × channel, and channel dummies.
- **Models**, each fitted directly for each horizon h:
- negative binomial for weekly plays (dispersion by maximum likelihood);
- logistic regression for "in rotation";
- a local-level Kalman filter on log plays (the "artist form" first version);
- the doc's persistence and popularity baselines.
- **Backtest:** origins from week 26, refitted weekly. It scores:
- log-loss and Brier score on all rows and on adds (rows not in rotation at the origin);
- PR-AUC on adds and MAE on plays;
- Spearman and NDCG@50 of the artist ranking;
- skill against the baselines, with 90% block-bootstrap intervals;
- calibration by decile.
- **Ranking:** NB means per channel, simulated with one gamma draw per artist shared by all channels. It gives P(rotation) per channel, P(any channel), and total plays with an 80% interval.
**Known limits:**
- **The artist pool is selected.** Only artists heard on DR in the week the pages were read are in it, so every artist was played at the end of the window, and add rates late in the window are inflated. Widening the pool fixes this: artists from IFPI charts, Bauer logs, featured artists and older plays.
- **Not conditioned on a release yet.** The ranking is expected airplay given current form. The release-effect event study needs release dates (Deezer backfill).
- **"Release timing only" is not scored yet.** That baseline needs release dates too.
- **Christmas is barely seen.** It appears only as lag history (weeks 48–52 of 2025), never as a target week.