Dugout Value
Baseball research on pitching, hitting, and projections, plus tools for comparing players, contracts, and trade value.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证IPL analytics + ML Dream11 fantasy-points model (LightGBM, quantile ranges, exact XI optimiser) with a Model Lab. Next.js + FastAPI + Postgres.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
IPL analytics and a machine-learning Dream11 fantasy-points model: 19 seasons of
ball-by-ball data (2008–2026), a LightGBM model that predicts every player's fantasy points
(with a floor–ceiling range) at the toss, an exact team optimiser, and a Model Lab that
explains how the model was trained and how good it really is.
Live: website https://predict11-olive.vercel.app · API https://predict11-api.onrender.com/docs
(free tier: the first request after ~15 idle minutes takes about a minute to wake the API)查看完整 README ↗IPL analytics and a machine-learning Dream11 fantasy-points model: 19 seasons of ball-by-ball data (2008–2026), a LightGBM model that predicts every player's fantasy points (with a floor–ceiling range) at the toss, an exact team optimiser, and a Model Lab that explains how the model was trained and how good it really is.
Live: website https://predict11-olive.vercel.app · API https://predict11-api.onrender.com/docs
(free tier: the first request after ~15 idle minutes takes about a minute to wake the API)
| Area | What you get |
|---|---|
| Points table | Every season 2008–2026, official NRR / tie-breaks, playoff results, champion card, season leaders, points race, playoff scenarios and the season story |
| Teams | Franchise history, season-by-season finishes, squad (latest roster), matches, team v team |
| Players | Full profiles (batting, bowling, fielding, phase splits, pace v spin, v batting hand), fantasy range, form; Compare up to 3 players with split bars, skill radar and season charts |
| H2H | Batter v bowler face-off with sample-size confidence, dismissal types, by season |
| Venues | Stadium photos, par scores (2023+ impact-player era vs all-time), toss and chase trends, phase run rates, pace v spin, dew & weather |
| Fantasy | Dream11 points for every match since 2008 (validated 40/40 against published 2026 totals), leaderboards, consistency, hindsight best XIs, team of the season |
| Predictions | The model's XI for every 2026 match, made before the match from earlier data only, vs a last-5-form baseline and the best possible XI |
| Build | Pitch-view team builder on the model's predictions: lock / exclude, re-optimise under Dream11 rules |
| Model Lab | The whole training story for learning ML: data, 92 features, learning curves, tuning, evaluation with confidence intervals, calibration, residuals, SHAP explanations, run comparison and a glossary |
Predicts each player's Dream11 points at the toss (playing XIs, venue, toss and weather known; everything else from earlier matches only).
| vs last-5 baseline | 2025 test (frozen) | 2026 walk-forward (retrained) |
|---|---|---|
| Best-XI points / match | 759 vs 751 (n.s.) | 831 vs 755 (+76, CI +39…+115) |
| Captain in top 2 | 21% vs 17% (n.s.) | 27% vs 7% |
| MAE per player | 33.6 vs 35.9 | 35.5 vs 38.5 |
Fantasy points are mostly noise (the model explains ~5% of variance), so the edge comes from many small advantages and is largest when the model is retrained in-season. Full write-up: docs/MODEL-REPORT.md, and interactively in the Model Lab.
Cricsheet (2008–26) ─┐ ┌─► Next.js 16 web (Vercel)
stats.bcci.tv ───────┼─► ingest + player registry ─► Postgres (Supabase) ◄─┤
ESPN / Cricbuzz ─────┤ Dream11 scoring, weather, ▲ └─► FastAPI (Render)
Open-Meteo ──────────┘ photos, credits │ │
│ analytics, optimiser,
features ─► LightGBM (mean + quantiles) ┘ Model Lab, predictions
| Layer | Stack |
|---|---|
| Web | Next.js 16 (App Router), React, Tailwind v4, TanStack Query, Recharts, Vitest |
| API | Python 3.12+, FastAPI, SQLAlchemy, Pydantic, pandas, LightGBM, PuLP / HiGHS, uv |
| Data | PostgreSQL 16/17, Alembic migrations |
| Deploy | Vercel (web) · Render free, Docker (API) · Supabase free (Postgres) · GitHub Actions (CI, keep-alive) |
backend/ FastAPI app + data pipeline + model (src/p11/{api,analytics,ingest,registry,
scoring,fantasy,features,model,optimize}), Alembic migrations, tests
web/ Next.js app (src/app routes, src/features/*, shared src/components)
models/ trained model run deployed with the API (models/latest.json → run dir)
data/ raw inputs (squad CSVs with credits, curated photo lists); downloads are git-ignored
docs/ model report, plan, feature catalog, design direction, next queue
infra/ docker-compose for local Postgres, helper scripts
spikes/ early source-scraping experiments
Requirements: Docker, uv, Node 22+ and pnpm.
cp .env.example .env
make db-up # Postgres 16 on :5433
make setup # backend deps
make migrate # schema
make api # API on http://localhost:8000 (docs at /docs)
make web # web on http://localhost:3000 (cd web && pnpm install first)
make test # backend tests (integration tests need the loaded database)
Loading the data from scratch (uv run p11 --help lists everything):
cd backend
uv run p11 cricsheet download ... # Cricsheet zips
uv run p11 registry load # players, ids, aliases
uv run p11 backfill cricsheet ... # matches + ball-by-ball
uv run p11 fantasy compute # Dream11 points per player-match
uv run p11 credits load --season 2025 # squad CSVs → credits
uv run p11 attributes load # roles, batting hand, bowling type, photos
uv run p11 media cache --all # local photo cache
uv run p11 weather venues ... # coordinates + match weather
uv run p11 model train # ~25 min on 8 cores; writes models/<run>/ + DB rows
A snapshot of the database can be restored with make db-restore FILE=....
render.yaml blueprint → Docker image from backend/Dockerfile
(bundles the model run). Set P11_DATABASE_URL. Auto-deploys on push to main.web/, env NEXT_PUBLIC_API_URL = the API URL..github/workflows/keepalive.yml pings the API every 2 days (repo variable
API_URL) so the free database doesn't pause.models/<run>/ and Render redeploys.Ball-by-ball data from Cricsheet (ODC-BY). Player photos and team crests from the official IPL site; stadium photos from Wikimedia Commons under their CC licences (credited on each page). Weather from Open-Meteo. Not affiliated with the IPL, BCCI or Dream11; for analysis and learning only.
The previous (v1) version of this project is preserved at the v1 tag.