CoolFace
Datasetpublic

roirani80/fantasistats-players

Fantasistats — Synthetic Player Dataset Supporting dataset and notebooks for Fantasistats, an AI scouting co-pilot for fantasy football. Data Science final project, Reichman University (Ido & Roy). Contents players.parquet — 10,000 synthetic scouting profiles (see schema below) artifacts/ embeddings_winning.npy, faiss_index.bin, winning_model.txt — the winning embedding model's vectors + FAISS index over players.parquet points_predictor.joblib — trained… See the full description on the dataset page: https://huggingface.co/datasets/roirani80/fantasistats-players.

sourceHugging Facemitupdated 1mo agoView on Hugging Face
0likes54downloads
Dataset Card

Fantasistats — Synthetic Player Dataset

Supporting dataset and notebooks for Fantasistats, an AI scouting co-pilot for fantasy football. Data Science final project, Reichman University (Ido & Roy).

Contents

  • —players.parquet — 10,000 synthetic scouting profiles (see schema below)
  • —artifacts/
  • —embeddings_winning.npy, faiss_index.bin, winning_model.txt — the winning embedding model's vectors + FAISS index over players.parquet
  • —points_predictor.joblib — trained RandomForest points predictor
  • —crosswalk_config.json — the synthetic-archetype → real-FPL-feature crosswalk mapping, plus training config
  • —fantasistats_data.ipynb — Part 1 (synthetic data generation) + Part 2 (EDA + hallucination audit)
  • —fantasistats_model.ipynb — Part 3 (embedding benchmark + FAISS), Part 3b–d (real FPL data ingestion, crosswalk, points predictor), Part 4 (Qwen generation), Part 5 (Space deployment)
  • —fantasistats_whatsapp_bot.ipynb — Bonus B, the Twilio WhatsApp webhook (see the Space README's "Bonus: WhatsApp bot" section for why this runs separately in Colab)

Player schema

FieldTypeExample
player_idint4821
namestring (generated)"Marcus Iwerebon"
ageint (16–38)23
nationalitystring"Nigeria"
positioncategoricalGK / CB / FB / DM / CM / AM / W / ST
club, leaguestringflavor fields
pace, shooting, passing, dribbling, defending, physicalint (1–99)position-aware distributions
market_value_eurint4,500,000
recent_formfloat (0–10)7.2
biostring (generated)2–4 sentence scouting note

Generation methodology

Two-step generation, per player:

  1. 1.Programmatic sampling of age, nationality, position, the 6 stat ratings (position-aware distributions — e.g. strikers skew high on shooting), market value, and recent form — giving full control over diversity and a clean ground truth to audit against.
  2. 2.Qwen2.5-0.5B-Instruct writes a bio consistent with the sampled attributes, given them directly in the prompt.

This built-in ground truth is what makes the EDA hallucination audit below possible.

EDA highlights

  • —Full distributions and correlations across position, nationality, age, and all 6 stats vs. market value / recent form — see fantasistats_data.ipynb Part 2.
  • —Hallucination audit (stat-consistency): scaled to the full n=10,000 profiles, 0 contradictions found between the generated bio text and the sampled stats. Rate bounded below 0.03% at 95% confidence (rule of three).
  • —Hallucination audit (role-identity, independent second check): also n=10,000, also 0 contradictions between the bio's described role and the sampled position.
  • —Both detectors were verified to actually fire on injected fabricated contradictions before trusting the 0% result.
  • —Honest caveat: Qwen was handed the ground-truth stats/position directly in the prompt, so 0% here reflects prompt-faithfulness under those conditions, not an absence of hallucination risk in general — see Part 4's generation-hallucination findings (in the Space README) for the contrast, where the real player's grounding data had to be added explicitly to fix similar issues.

Embedding benchmark

3 models benchmarked on a 24-query, rule-scored evaluation set (does the retrieved top-3 match the intended position + clear a stat threshold):

ModelHit rate
BAAI/bge-small-en-v1.5 (winner)100%
intfloat/e5-small-v295.8%
sentence-transformers/all-MiniLM-L6-v275%

The first run scored far lower across the board (33%/12.5%/12.5%) due to two bugs: missing query/passage prefix conventions per model, and an out-of-distribution pipe-delimited embedding text format. Both fixed — see fantasistats_model.ipynb Part 3 for the full before/after.

Points predictor

RandomForest trained on real historical vaastav/Fantasy-Premier-League gameweek data (29,725 raw rows → 27,016 training rows after cleaning), predicting next-gameweek points from form, minutes, ICT index, price, fixture difficulty, and home/away.

ModelMAERMSE
RandomForest (winner)0.931.96
Ridge0.991.96

Feature importance order (minutesprev > price > form3gw > ictprev > difficulty > washome_next) matches known FPL analytics intuition. Backtest predictions cluster near the mean and miss outlier hauls/blanks — expected, since the feature set has no start-probability or injury signal.

Links

  • —App: https://huggingface.co/spaces/roirani80/fantasistats-app
  • —Full pipeline write-up, known limitations, and the WhatsApp bot: see the Space's README above