Surge-based adds (onset, or plays jumping well above the artist's own baseline and staying up): finds 77% of DR's real song adds vs 64% for onset only; addcheck validation against the lists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 13:04:22 +00:00
co-authored by Claude Opus 5.5
parent bc222d3cd0
commit cb5224fc4f
4 changed files with 142 additions and 47 deletions
+7
View File
@@ -11,6 +11,7 @@
//! airplay model adds [--h 0,4] [--out docs/BACKTEST-ADDS.md] backtest of the new-add model
//! airplay model rank [--h 4] [--max-h 12] [--top 50]
pub mod addcheck;
pub mod adds;
pub mod backtest;
pub mod calibrate;
@@ -83,7 +84,12 @@ pub fn run(db: &Db, args: &[String]) -> Result<()> {
if let Some(out) = arg(args, "--out") { std::fs::write(out, &md)?; }
print!("{md}");
}
Some("addcheck") => {
if let Some(r) = arg(args, "--rule") { let _ = adds::ADD_RULE.set(r); }
print!("{}", addcheck::run(db, &p)?);
}
Some("events") => {
if let Some(r) = arg(args, "--rule") { let _ = adds::ADD_RULE.set(r); }
let tau = common::thresholds(&p, 26);
let mut md = String::new();
let rows = adds::backtest_events(&p, &tau, 26, &mut md)?;
@@ -97,6 +103,7 @@ pub fn run(db: &Db, args: &[String]) -> Result<()> {
print!("{md}");
}
Some("adds") => {
if let Some(r) = arg(args, "--rule") { let _ = adds::ADD_RULE.set(r); }
if let Some(w) = arg(args, "--without") { let _ = adds::WITHOUT.set(w.split(',').map(str::to_string).collect()); }
let horizons: Vec<usize> = arg(args, "--h").unwrap_or_else(|| "0,4".into()).split(',').filter_map(|s| s.trim().parse().ok()).collect();
let tau = common::thresholds(&p, 26);