Skip to content

v0.3.0 - Full Grid Race Prediction (Phase 1)

Latest

Choose a tag to compare

@sarva-20 sarva-20 released this 25 Jan 09:55
· 1 commit to main since this release
18b3a70

๐ŸŽ๏ธ BoxMachiBox v0.3.0 - Full Grid Race Prediction

Major feature release: Predict complete race results for all 20 drivers!

โœจ What's New

๐Ÿ†• Full Grid Prediction Endpoint

  • POST /api/predict/full-grid - Predict finishing order P1-P20
  • Input: All 20 drivers with starting grid positions
  • Output: Complete race prediction with probabilities

๐Ÿ“Š Enhanced Predictions

  • Predicted finishing order (P1-P20)
  • Top 3 podium finishers
  • Points-scoring positions (P1-P10)
  • Fastest lap prediction
  • DNF (Did Not Finish) risk assessment
  • Confidence scores for each position
  • Expected championship points calculation

๐Ÿ”ง Phase 1 Implementation

Current Approach:

  • Uses existing XGBoost model (93.89% accuracy)
  • Ranks all 20 drivers by podium probability
  • Adjusts for DNF risk based on grid position
  • Circuit-specific difficulty factors (Monaco, Singapore, Hungary)
  • Weather impact on predictions

Phase 2 (Coming Soon):

  • Retrained model for exact position prediction (multi-class)
  • Position-specific features
  • Enhanced accuracy for mid-field positions

๐Ÿ“ API Example

Request:

{
  "grid": [
    {"position": 1, "driver": "Max Verstappen"},
    {"position": 2, "driver": "Lando Norris"},
    ...
    {"position": 20, "driver": "Franco Colapinto"}
  ],
  "circuit": "Monaco",
  "weather": "Dry"
}

Response:

{
  "predicted_results": [
    {
      "position": 1,
      "driver": "Lando Norris",
      "starting_grid": 2,
      "podium_probability": 0.892,
      "confidence": "High",
      "expected_points": 25
    },
    ...
  ],
  "podium": ["Lando Norris", "Max Verstappen", "Charles Leclerc"],
  "points_positions": [...],
  "fastest_lap_prediction": "Lando Norris",
  "dnf_predictions": ["Franco Colapinto"]
}

๐Ÿ”— API Endpoints

Production: https://boxmachibox.onrender.com

New Endpoints:

  • POST /api/predict/full-grid - Full race prediction

Existing Endpoints:

  • POST /api/predict - Single driver podium prediction
  • GET /api/drivers - List all drivers
  • GET /api/drivers/enhanced - Drivers with team codes
  • GET /api/circuits - List all circuits
  • GET /api/circuits/enhanced - Circuits with track names
  • GET /api/standings/2025 - Championship standings
  • GET /api/model/info - Model metadata

๐Ÿ“Š Technical Details

  • Backend Version: 0.3.0
  • Model: XGBoost (Phase 1 - probability-based ranking)
  • Accuracy: 93.89% on podium predictions
  • Training Data: 2022-2025 (R1-R20)
  • Features: 47 engineered features

๐ŸŽฏ Use Cases

  • Pre-race predictions - Predict full race results before lights out
  • Strategy planning - Understand expected finishing positions
  • Fantasy F1 - Make informed driver selections
  • Championship scenarios - Calculate points impact
  • Race analysis - Compare predicted vs actual results

๐Ÿš€ Frontend Integration

Frontend developers can now:

  1. Build full grid input UI (20 driver dropdowns)
  2. Call /api/predict/full-grid endpoint
  3. Display complete race predictions
  4. Show DNF risks and confidence levels

Documentation: See API docs at /docs endpoint

๐Ÿ”ฎ What's Next (v0.4.0)

  • Weather API integration
  • Enhanced circuit-specific features
  • Phase 2: Multi-class position prediction model

Live API: https://boxmachibox.onrender.com/docs
Frontend: https://boxmachibox.vercel.app/

๐Ÿ‘ฅ Team

@sarva-20 - Backend & ML


<img width="1409" height="938" alt="image" src="https://github.com/user-attachments/assets/91981682-8029-4569-8fb5-a2cc2003ca4b" />
<img width="1123" height="941" alt="image" src="https://github.com/user-attachments/assets/c72851ac-5bdc-440b-94e1-5efa7a5dfd1e" />