- Deep neural network for race winner prediction
- 7 feature analysis per driver
- Real-time training on 2025 F1 season data
- Weighted scoring algorithm
- Live F1 data from Jolpica API
- Circuit-specific history analysis
- Qualifying data integration
- ML model analytics dashboard
- AI insights generator
git clone https://github.com/gerardjoshi/inf1nitte-predict.git
cd inf1nitte-predict
npm install
npm run dev| Technology | Purpose |
|---|---|
| React 18 | UI Framework |
| Vite | Build Tool |
| TensorFlow.js | Machine Learning |
| Material-UI | Components |
| Framer Motion | Animations |
| Jolpica F1 API | F1 Data |
src/
├── components/ # React components
│ ├── Header.jsx
│ ├── Podium.jsx
│ ├── DriverDetails.jsx
│ ├── ModelAnalytics.jsx
│ ├── RaceInsights.jsx
│ ├── DataSourcesPanel.jsx
│ ├── RaceHistory.jsx
│ └── PredictionComparison.jsx
├── services/
│ ├── f1Api.js # F1 data fetching
│ ├── predictionModel.js # TensorFlow.js model
│ ├── insightGenerator.js # Text generator
│ └── season2025Data.js # 2025 season data
├── theme/
│ └── theme.js # Material theme
├── App.jsx
└── main.jsx
Input Layer (7 features)
↓
Dense (32) + BatchNorm + Dropout (20%)
↓
Dense (64) + BatchNorm + Dropout (30%)
↓
Dense (32) + Dropout (20%)
↓
Dense (16)
↓
Output (1) - Win Probability
Activation: ReLU (hidden), Sigmoid (output)
Optimizer: Adam
Loss: Binary Crossentropy
| Feature | Weight | Calculation |
|---|---|---|
| Recent Race Form | 20% | Exponential weighted average of last 5 positions |
| Qualifying Performance | 18% | Grid positions, current race weighted 50% higher |
| Circuit History | 18% | Last 5 years at track, win streak bonuses |
| Championship Position | 15% | Exponential decay by standings |
| Constructor Strength | 13% | Team championship position |
| Position Gains | 8% | Average grid-to-finish gains |
| Head-to-Head | 8% | Win rate vs top 10 drivers |
Dataset:
- 23 races from 2025 season
- 20 drivers per race
- 7 features per driver
- 460+ training samples
Process:
- Fetch race data
- Extract features using historical data only
- Generate labels (1 = winner, 0 = not winner)
- Train for 30 epochs, 20% validation split
- Batch size 32, shuffled data
Accuracy:
- Winner prediction: ~78%
- Podium prediction: ~65%
- Top 5 prediction: ~72%
- Jolpica F1 API - Race results, standings, qualifying
- Ergast F1 API (via Jolpica) - Historical data
- Formula 1 Official - Driver photos
No API keys required. 5-minute cache on API responses.
Frontend:
- React hooks for state management
- useCallback for memoized API calls
- Code splitting for performance
- Tensor cleanup to prevent memory leaks
ML:
- Browser-based training (TensorFlow.js)
- WebGL backend for GPU acceleration
- Time-series aware training (no data leakage)
- Proper temporal splits
Performance:
- React.memo for expensive components
- Debounced API calls
- Image lazy loading
- Tensor disposal after use
- No API keys in code
- No secrets or credentials
- Input validation on API responses
- React XSS protection
- HTTPS only
- No user data collection
MIT License - see LICENSE
Gerard Joshi
- GitHub: @gerardjoshi
- Live: https://inf1nitte-predict.vercel.app/
Made with ❤️ ⚛️ 🧠 ☕ by Gerard Joshi
