Skip to content

Phase5 v9 phase matchups - #9

Open
Ajay03299 wants to merge 3 commits into
mainfrom
phase5-v9-phase-matchups
Open

Phase5 v9 phase matchups#9
Ajay03299 wants to merge 3 commits into
mainfrom
phase5-v9-phase-matchups

Conversation

@Ajay03299

Copy link
Copy Markdown
Owner

What changed

Three stacked upgrades on top of v8:

A) Applied v7 redundancy removal to v8 base

  • Dropped 22 features with |r|>0.90 (e.g. balls_bowled ≡ overs_bowled)
  • Free noise reduction — v8 had skipped this cleanup

B) Added 6 phase x bowler type features from 278K deliveries

  • batter_sr_pace_in_pp_before (SR vs pace in powerplay)
  • batter_sr_spin_in_pp_before
  • batter_sr_pace_in_mid_before
  • batter_sr_spin_in_mid_before
  • batter_sr_pace_in_death_before
  • batter_sr_spin_in_death_before

Why this matters: Dhoni has SR 87 vs pace in powerplay but 178 in death overs.
AB de Villiers: 108 vs pace in PP but 233 in death. The model couldn't see this before.

C) Added opponent bowling quality index

  • opp_bowl_quality_eco (rolling avg economy of opponent's bowlers)
  • opp_bowl_quality_sr (rolling avg bowling SR)

Results

Metric v6 (start) v8 (prev) v9 (now) Total gain
Spearman 0.1725 0.4575 0.4963 +187.6%
Top-11 53.18% 64.72% 66.93% +25.9%
NDCG 0.6014 0.7509 0.7892 +31.2%
MAE 26.06 22.47 21.12 -18.9%

The model now correctly identifies 7.4 out of 11 top players per match.

Feature importance

4 of the top 7 features are new phase-matchup features:

  1. actually_bowled_rate_last_5 (0.0547)
  2. batter_sr_pace_in_mid_before (0.0307) 🆕
  3. batter_sr_spin_in_mid_before (0.0256) 🆕
  4. batter_sr_pace_in_pp_before (0.0218) 🆕
  5. batter_sr_spin_in_pp_before (0.0201) 🆕
  6. batter_death_sr_before (0.0191)
  7. batter_sr_pace_in_death_before (0.0173) 🆕

Leakage audit

  • Duplicates: 0 ✅
  • Row count: 25,634 (consistent with v8 post-dedup) ✅
  • All features use strictly historical data (cumsum + shift) ✅

v8 vs v6:
- Spearman: 0.1725 -> 0.4568 (+164.7%)
- Top-11: 53.18% -> 64.79% (+21.8%)
- NDCG: 0.6014 -> 0.7495 (+24.6%)
- MAE: 26.059 -> 22.408

New features from 278K ball-by-ball deliveries:
- batter_sr_vs_pace/spin_before (career SR vs bowling type)
- batter_avg_vs_pace/spin_before
- matchup_advantage (r=0.24 — strongest feature in entire dataset)
- opponent_pace_pct / opponent_spin_pct (attack profile)
- batter_death_sr_before / bowler_death_eco_before
- batting_first, toss_won, toss_chose_field

The matchup_advantage feature alone nearly doubled the previous
best feature correlation (0.24 vs 0.15 for points_last_10_avg).
Audit results (post-fix):
- Duplicates: 0 (was 240)
- Rows: 25634 (80 lost in toss join, acceptable)
- Temporal integrity: clean
- matchup_advantage r=0.24 (only 0.19 with career_avg — independent signal)

Clean v8 results confirmed:
- Spearman: 0.4575 (+165% vs v6)
- Top-11: 64.72% (+21.7%)
- NDCG: 0.7509 (+24.8%)
- MAE: 22.474 (-13.8%)
…6.93%

v9 vs v6:
- Spearman: 0.1725 -> 0.4963 (+187.6%)
- Top-11: 53.18% -> 66.93% (+25.9%) = 7.4/11 correct
- NDCG: 0.6014 -> 0.7892 (+31.2%)
- MAE: 26.06 -> 21.12 (-18.9%)

v9 vs v8:
- Spearman: 0.4575 -> 0.4963 (+8.5%)
- Top-11: 64.72% -> 66.93% (+3.4%)

Three upgrades:
A) Applied v7 redundancy removal to v8 base (dropped 22 noisy features)
B) Added 6 phase x bowler type features (PP/MID/DEATH x PACE/SPIN)
C) Added opponent bowling quality index (economy + SR rolling)

4 of top 7 features are new phase-matchup features:
- batter_sr_pace_in_mid (#2)
- batter_sr_spin_in_mid (#3)
- batter_sr_pace_in_pp (#4)
- batter_sr_pace_in_death (#7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant