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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user