Spaces:
Running
Running
Commit History
Today
-
Auto: refresh team ratings (market prior gw10) Running
d071bac
2 days ago
-
Auto: refresh team ratings (market prior gw9)
47a71e2
4 days ago
-
Auto: refresh team ratings (market prior gw9)
4ade562
6 days ago
-
Auto: refresh team ratings (market prior gw9)
b7a8379
8 days ago
-
Auto: refresh team ratings (market prior gw9)
6b5028a
10 days ago
-
Auto: refresh team ratings (market prior gw8)
07f5db7
12 days ago
-
Auto: refresh team ratings (market prior gw8)
1fcb53d
14 days ago
-
Auto: refresh team ratings (market prior gw8)
1868e7d
16 days ago
-
Auto: refresh team ratings (market prior gw7)
9294efc
18 days ago
-
Auto: refresh team ratings (market prior gw7)
4f009af
20 days ago
-
Auto: refresh team ratings (market prior gw7)
a60e729
22 days ago
-
Auto: refresh team ratings (market prior gw7)
d7dea49
24 days ago
-
Auto: refresh team ratings (market prior gw6)
80d2875
26 days ago
-
Auto: refresh team ratings (market prior gw6)
a844571
30 days ago
-
Auto: refresh team ratings (market prior gw6)
6758861
-
Auto: refresh team ratings (market prior gw6)
f50e397
-
Auto: refresh team ratings (market prior gw6)
94c66b2
-
Auto: refresh team ratings (market prior gw6)
9b2e752
-
Auto: refresh team ratings (market prior gw5)
1d05f5b
-
Auto: refresh team ratings (market prior gw5)
c93b0ff
-
updates
1fc7304
-
Auto: refresh team ratings (market prior gw5)
ea6d0a8
-
Auto: refresh team ratings (market prior gw4)
f393ffa
-
Auto: refresh team ratings (market prior gw4)
a14fb7c
-
Auto: refresh team ratings (market prior gw3)
78952fa -
Auto: refresh team ratings (market prior gw3)
c7f0725 -
Auto: refresh team ratings (market prior gw3)
72315ba -
Auto: refresh team ratings (market prior gw3)
f49d1c7
-
Auto: refresh team ratings (market prior gw3)
cec34e6
-
Refresh and publish team ratings from the every-2-days cron
run_auto.py only ever wrote xMins to Supabase. team_totals.xlsx was never regenerated by any automation, and main.py reads it from the repo at startup, so the market prior would have gone stale the moment it was built. New step 6, after the Supabase write and deliberately non-blocking: rebuild market_ratings.json from current odds, rebuild the workbook, sanity-check it, then commit and push so the Space picks it up via sync.yml. Ratings move slowly and the previous workbook stays valid, so a failure here must never cost the run its xMins write - that is the part that genuinely goes stale every gameweek. build_team_totals grows a rebuild() entry point so the cron does not shell out to argparse. Two things had to be got right for the publish to be safe: Change detection compares a hash of Sheet2's rounded values, held in ratings_signature.txt, not the workbook. An .xlsx is a zip with embedded timestamps so its bytes differ on every rebuild even when no rating moved, and committing on…f730e61 -
Blend a decaying market-odds prior into the team xG rating
At GW1 a team's rating is 94.7% last-four-seasons, because the weighting is a per-match rate and one gameweek is worth one match-equivalent out of ~18.8. That is correct for results - a backtest sweeping how hard to weight the current season finds the existing scheme already optimal, and every more reactive variant scores worse. But it leaves the model blind to everything that happened before a ball was kicked: new managers, transfers, preseason. Betting markets price exactly that. Two free feeds, because neither is sufficient alone: football-data.co.uk Pinnacle CLOSING 1X2, over/under and Asian handicap for every completed match, ~20 seasons, no key. Sharp, but published after each round. the-odds-api.com Live prices for upcoming fixtures. Free tier is 500 credits/month; one h2h,totals call for soccer_epl in one region costs 2 and returns every upcoming match, so …540e846 -
Calibrate promotion and league-strength discounts from observed moves
Two places the model treated non-Premier-League output at face value. Promoted clubs: CHAMPIONSHIP_FACTOR was a single 0.7 across every stat. Measured against all 12 teams promoted in 2022-23..2025-26, comparing each one's Championship per-match rate to the PL rate they went on to post, 0.7 is right for xG (0.68) but wrong elsewhere - and inverted for defensive volume, which RISES on promotion because a promoted side spends the season defending. Coventry and Hull defenders were carrying CBIT baselines ~43% too low. Replaced with per-stat factors. Championship-sourced seasons are now always recomputed rather than carried from the existing workbook, since those are the rows the factors apply to. PL seasons still carry: re-deriving them from JSON introduces its own drift (~8% on xA). Established teams move 0.00% as a result. Player baselines: fotmob_weighted carried the league column as metadata and never used it, so Tzolis' Jupiler Pro League numbers entered at full value, weighted 1.…e676f02
-
Automate team_totals.xlsx from scraped match data
Replaces the manual loop of running fotmob_team_totals.ipynb and copy-pasting its CSV into Sheet1. build_team_totals.py reads data/{league}/{season}/*.json directly and writes both sheets. Promoted clubs have no Premier League history, so any season a team spent in the Championship falls back to their Championship totals scaled by 0.7. Match counts are not scaled, so the effect is a straight discount on the per-match rate. This fills in Coventry, Hull and Ipswich, who were absent from the workbook entirely and were therefore reaching main.py as NaN and being zeroed by fillna(0). Older seasons are carried over from the existing workbook rather than recomputed: the current JSONs do not reproduce the hand-pasted history (xA drifts 12-14%, 2021-22 red cards by 87%), while 2025-26 reproduces exactly. --rebuild-history opts into recomputing everything. Sheet2 is written as computed values, not formulas. openpyxl cannot store a cached result alongside a formula and pd.read_excel only reads…149df76
-
updates
b5c6518
-
updates
93a7698
-
updates
ce3e51b
-
updates
eae3e90
-
updates
052f3f2
-
gw34 data update
8b5dfee
-
updates
5c803fc
-
Clean Production Release
f7cecf3