This is a personal project where I built a football match prediction and value betting assistant from scratch.
update_results_all_leagues.py – downloads & updates historical match results.build_ml_dataset_v3.py – builds the ML dataset (ml_dataset_v3.csv) from the results.train_ml_xgb_v3.py – trains the base XGBoost classifier.train_ml_xgb_calibrated.py – calibrates the probabilities and saves football_ml_model.pkl.model.py – core prediction logic (features, probabilities, live adjustment, betting logic).manual_predict.py – command-line interface: enter teams, date, status, odds → get prediction & suggested bet.# 1. Install dependencies
pip install -r requirements.txt # (or manually install pandas, numpy, scikit-learn, xgboost, requests)
# 2. Set your API key
# Edit fd_api.py (or api_handler.py) and put your football-data.org API key there.
# 3. Update / rebuild data and model (optional, only when you want to refresh)
python update_results_all_leagues.py
python build_ml_dataset_v3.py
python train_ml_xgb_v3.py
python train_ml_xgb_calibrated.py
# 4. Use the CLI prediction tool
python manual_predict.py