Repository navigation
๐๏ธ 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 predictionGET /api/drivers- List all driversGET /api/drivers/enhanced- Drivers with team codesGET /api/circuits- List all circuitsGET /api/circuits/enhanced- Circuits with track namesGET /api/standings/2025- Championship standingsGET /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:
- Build full grid input UI (20 driver dropdowns)
- Call
/api/predict/full-gridendpoint - Display complete race predictions
- 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" />