IAmBETter – Serie A Match Predictor

Home Work02 Mobile Data Marketplace

⚽ IAmBETter – Serie A Match Predictor

IAmBETter is an AI-powered web application that predicts outcomes of Serie A football matches using historical statistics. It uses a trained machine learning model to generate match results (1, X, 2), stores predictions in a MongoDB database, and displays them in a live-updated UI.

🎯 Project Objective

The project aims to build an automated prediction system for Serie A matches, combining a FastAPI-based ML model with an ASP.NET Core frontend. Predictions are trained on historical team statistics gathered from a third-party API (API-Football).

🏗️ Architecture

  • ASP.NET Core Razor Pages frontend
  • FastAPI (Python) service for training & prediction using XGBoost
  • MongoDB for persisting matches, predictions, and teams

🔄 PredictionServiceTask

Fetches matches and statistics, prepares training data, calls the ML service for training and prediction, and stores results.

📜 HistoryServiceTask

Compares past predictions to real outcomes and marks them as successful or failed, archiving them accordingly.

🚀 Features

  • Automatic model training from uploaded CSV datasets
  • Match prediction from live API-Football data
  • MongoDB persistence with historical tracking
  • Live-updating frontend table with match outcomes

📂 Project Structure

Split between app/ (Python FastAPI) and iambetter/ (.NET Razor frontend). The model is stored as optimized_model.pkl.

🧠 Machine Learning Pipeline

  1. CSV loading and label encoding
  2. Feature engineering and SMOTE balancing
  3. Train/test split and GridSearchCV for hyperparameter tuning
  4. XGBoost + Scikit-learn pipeline with evaluation metrics

📊 Example Output

Inter vs Milan → 1 → ✅ Success

Lazio vs Juventus → X → ❌ Failed

Tools and language

Tools and language

Image placeholder

Simone Riggi

Software engineer with 5+ years of experience. Experienced in Desktop Apps, Web Apps, APIs development and interested in everything related to coding and web technologies.