[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92376":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":25,"discoverSource":26},92376,"world_cup_predictions","mar-antaya\u002Fworld_cup_predictions","mar-antaya","A basic python script to predict the 2026 FIFA World Cup Matches",null,"Python",54,15,52,0,2,43.81,"MIT License",false,"main",true,[],"2026-07-22 04:02:06","# 2026 FIFA World Cup match predictor\n\nA small, readable model that predicts the outcome of a single 2026 World Cup match — win \u002F draw \u002F loss probabilities, plus a chart you can actually post. You give it two teams, it does the rest.\n\nI built this as a \"first real ML project\" you can fork and learn from. The whole thing is one file, no notebooks, no framework soup. If you've ever wanted to build a sports prediction model and didn't know where to start, start here.\n\n```\npython predict_today.py \"Saudi Arabia\" \"Uruguay\"\n```\n\n```\n============================================================\n  Saudi Arabia vs Uruguay\n  2026-06-15  ·  Group H  ·  Miami Stadium\n============================================================\n  Saudi Arabia           win     9.2%\n  Draw                          17.6%\n  Uruguay                win    73.2%\n------------------------------------------------------------\n  PICK: Uruguay  (73.2%)   [LOCK]\n============================================================\n```\n\n## How it works\n\nThere's no magic here — most of the work is in the features, not the model. For any match it builds:\n\n- **Elo ratings.** Computed from scratch over every international result since 2006. Each team starts at 1500 and trades points after every game, with a bigger swing for blowouts and upsets. This one number carries most of the signal.\n- **Recent form.** Win rate and goal difference over each team's last 5 and 10 matches.\n- **Rest days.** How long since each team last played.\n- **Head-to-head.** How these two specific teams have done against each other historically.\n- **Context flags.** Neutral venue, and how meaningful the match was (a World Cup game counts for more than a friendly).\n\nThose features go into an **XGBoost** classifier that outputs three probabilities. I went with gradient-boosted trees because this is tabular data with a few thousand rows — that's exactly where XGBoost beats both linear models (it picks up interactions on its own) and neural nets (which want far more data). It also trains in seconds and tells you which features it leaned on.\n\nThe model is trained only on matches *before* the one you're predicting, so it can't peek at the future. On a held-out validation set it lands around **60% accuracy** with a log-loss of **0.86 vs. 1.05** for a no-skill baseline — a real edge, but not a crystal ball (more on that below).\n\nThe fixtures, dates, groups and stadiums are read from `data_cache\u002Ffixtures.csv`, so you only ever type team names.\n\n## Setup\n\n```\npip install -r requirements.txt\npython predict_today.py \"Spain\" \"Cabo Verde\"\n```\n\nTeam order doesn't matter, and common spellings work (typing `Iran` is fine even though the schedule lists `IR Iran`). Run it with no arguments and it'll ask you for the two teams. The historical results file (~5MB) downloads automatically the first time you run it.\n\nEach run also drops a branded probability chart in `predictions\u002F\u003Cdate>\u002F`.\n\n## What it doesn't do (yet)\n\nBeing honest about this matters more than the accuracy number. The model rates *teams*, not the eleven players actually on the pitch, so:\n\n- No injuries or suspensions.\n- No expected goals (xG) — which is the stat that actually moves modern soccer models.\n- No lineups, no manager\u002Ftactics, no \"this team only needs a draw to advance\" context.\n\nIt also under-calls draws, like most win\u002Fdraw\u002Floss models do, because draws don't have a clean statistical fingerprint. Soccer is low-scoring and high-variance, so even a good model gets plenty wrong — judge it over a season of games with log-loss, not on any single result.\n\nNext on my list: pulling in xG and injury\u002Flineup data, and trying a goals-based (Poisson) approach that handles draws more naturally.\n\n## Data\n\nHistorical results come from the open [martj42\u002Finternational_results](https:\u002F\u002Fgithub.com\u002Fmartj42\u002Finternational_results) dataset. Fixtures are the official 2026 schedule.\n\n## License\n\nMIT — do whatever you want with it. If you build something cool on top, I'd love to see it and make sure you tag me @mar_antaya on Tiktok, Youtube and Instagram or Mariana Antaya on Linkedin!\n","这是一个基于机器学习的2026年国际足联世界杯单场比赛结果预测工具，输入两支参赛队即可输出胜\u002F平\u002F负概率及可视化图表。项目采用XGBoost分类器，特征包括自建Elo评分（2006年起国际赛数据）、近期战绩、休息天数、历史交锋与比赛情境标志等，模型训练严格遵循时间序列约束，验证准确率约60%。代码仅一个Python文件，无依赖框架，强调可读性与教学性。适用于足球爱好者、入门级数据科学学习者进行赛事模拟、小组出线推演或轻量级预测实践。","2026-07-08 04:30:13","CREATED_QUERY"]