Major refactor: Fantabeto 26/27 — modular package, GBM ensemble, MILP/MCTS optimization
Phase 1: Data Engineering
- Refactored notebooks into src/{scraper,features,models,optimization,bot}
- FBref scraper with proxy rotation + Playwright Cloudflare bypass
- Fantacalcio.it integrated scraper (authenticated API + HTML fallback)
- api-football RapidAPI client for supplementary xG/xA/injuries
- RAG news pipeline: Gazzetta, Sky Sport, Di Marzio → injury/suspension/tactical extraction
- 26/27 season config: teams, scoring rules, name mappings, news sources
Phase 2: SOTA ML Architecture
- GBM Ensemble (LightGBM + CatBoost + XGBoost) with stacked blending
- Bootstrap ensemble for uncertainty quantification
- SinhArcsinh distribution head (ported from original TF Probability)
- Card classifiers (yellow/red), penalty model, goal probability (Poisson)
- Temporal GNN for player interaction modeling (crosses→goals, passes→assists)
- Optuna hyperparameter tuning with time-series CV
Phase 3: Operations Research
- Auction solver: MILP knapsack with PuLP (budget + role constraints)
- Grid Auction (Asta a Griglia): Minimax game theory bidding strategy
- Weekly lineup optimizer: MCTS maximizing win probability vs opponent
- Modificatore Difesa integration + captain selection
- Transfer market analyzer: buy-low/sell-high via xG regression to mean
- Opponent behavior modeling from historical lineage patterns
Phase 4: Agentic Workflow
- Telegram bot: auto-briefing (Friday + Sunday morning)
- Tactical briefing generator with start/sit recommendations
- GitHub Actions CI/CD: scheduled pipeline (scrape → predict → notify)
Infrastructure:
- 31 pytest unit tests (features, models, scraper, optimization)
- requirements.txt (lightgbm, catboost, xgboost, optuna, pulp, playwright, langchain)
- Makefile with install/test/lint/scrape/train/bot targets
- Jupyter notebook: 26_27_strategy.ipynb demonstrating auction + matchday 1 mockup
- Completely rewritten README.md with architecture diagram
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# 2026/27 Serie A teams
|
||||
# Promoted teams subject to confirmation. Update after final Serie B playoff.
|
||||
teams:
|
||||
- Atalanta
|
||||
- Bologna
|
||||
- Cagliari
|
||||
- Como
|
||||
- Empoli
|
||||
- Fiorentina
|
||||
- Frosinone
|
||||
- Genoa
|
||||
- Inter
|
||||
- Juventus
|
||||
- Lazio
|
||||
- Lecce
|
||||
- Milan
|
||||
- Monza
|
||||
- Napoli
|
||||
- Parma
|
||||
- Roma
|
||||
- Sassuolo
|
||||
- Torino
|
||||
- Udinese
|
||||
|
||||
# Promoted from Serie B 2025/26 (tentative)
|
||||
promoted_2026_27:
|
||||
- Frosinone
|
||||
- Genoa
|
||||
- Sassuolo
|
||||
|
||||
# Relegated after 2025/26
|
||||
relegated_2025_26:
|
||||
- Venezia
|
||||
- Hellas Verona
|
||||
- Salernitana
|
||||
|
||||
fantacalcio_api:
|
||||
season_id_current: 21 # 2026/27
|
||||
season_id_last: 20 # 2025/26 (complete)
|
||||
season_id_previous: 19 # 2024/25
|
||||
season_id_older: 18 # 2023/24
|
||||
base_url: "https://www.fantacalcio.it/api/v1/Excel"
|
||||
Reference in New Issue
Block a user