Spaces:
Sleeping
Sleeping
metadata
title: UFC Fight Predictor
emoji: 🥊
colorFrom: red
colorTo: blue
sdk: gradio
sdk_version: 4.28.3
app_file: app.py
pinned: false
UFC Scraper & ML
Setup
Clone the repo (or download it), then open a terminal in the root folder
Install the required Python packages using pip:
pip install -r requirements.txt
Usage
1. Data Scraping
Initial Setup (First Time):
python -m src.main --pipeline scrape --scrape-mode full
Scrapes all historical fight data from ufcstats.com.
Update Data (Regular Use):
python -m src.main --pipeline scrape --scrape-mode update
Adds only the latest events to existing data.
2. Fight Prediction
Use Existing Models (Fast):
python -m src.main --pipeline predict
Loads saved models if available and retrains if new data available.
Force Retrain Models:
python -m src.main --pipeline predict --force-retrain
Always retrains all models from scratch with latest data. This is useful for when the way training models changes
3. Complete Pipeline
python -m src.main --pipeline all --scrape-mode update
Runs scraping (update mode), analysis, and prediction in sequence.
Model Performance
The system tests on the latest UFC event for realistic accuracy scores (typically 50-70% for fight prediction).
Output
- Data:
output/ufc_fights.csv
,output/ufc_fighters.csv
- Models:
output/models/*.joblib
- Results:
output/model_results.json