Skip to content

Repository files navigation

FPL Underdog Predictor

Live Site: fplbangers.com It provides predictions based on custom-trained machine learning models, updated weekly. The model identifies high-potential "underdog" players ((10% Own, £7m Cost) with 'Fail-Upward' logic) with strong form or underlying stats.

Built with Antigravity, Opus, and time :)

A machine learning-powered Fantasy Premier League (FPL) assistant that identifies high-potential "underdog" players—those with less than 10% ownership and under £8.0m—who have strong form or underlying stats. Predictions are updated weekly using custom-trained models.

Key Features

  • Component-Based Predictions: Predicts goals, assists, and clean sheets separately using LightGBM classifiers
  • Confidence Scoring: Color-coded predictions showing model certainty (green = high, yellow = medium, orange = low)
  • Dynamic Thresholds: Percentile-based player selection adapts to seasonal ownership/cost shifts
  • Live Match Scores: Real-time points updates during active gameweeks
  • Feature Importance Dashboard: Transparent view of which stats drive predictions
  • Prediction History: Track past picks with actual points backfill

Data Sources

  • Fantasy Premier League Official API – Player metadata, fixtures, and per-gameweek points
  • Understat API – Advanced metrics (xG, xA) and team defensive strength (xGA)

Quick Start

See run_instructions.md for detailed setup and deployment instructions.

# Install dependencies
py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

# Run full pipeline
python update_pipeline.py

# Or quick launch (app only)
python update_pipeline.py --quick

Documentation

Tech Stack

  • Backend: Flask (Python)
  • ML Models: LightGBM with TimeSeriesSplit cross-validation
  • Frontend: Responsive HTML/CSS/JS with tab-based navigation
  • Deployment: Northflank with Cloudflare DNS
  • CI/CD: GitHub Actions for automated weekly updates

License

MIT

About

A predictive model for player performance in the FPL

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages