NirmitSachde/Valorant-Match-Predictor
0
๐ฎ Valorant Match Predictor API
A comprehensive ML-powered prediction API for VALORANT esports matches.
๐ Features
- Team Matchup Predictions: Head-to-head analysis with historical data
- Player Synergy Calculations: Team chemistry and compatibility scores
- Map Preference Analysis: Team performance on different maps
- Role Composition Optimization: Best team compositions for each map
- Agent Selection Recommendations: Optimal agent picks for players
- Comprehensive Match Predictions: Multi-factor analysis with confidence scores
๐ก API Endpoints
Data Endpoints (GET)
/api/health- Health check/api/data/teams- Get all teams with ratings/api/data/players- Get all players with stats/api/data/maps- Get available maps/api/data/agents- Get agents by role/api/data/rankings- Get current team rankings/api/stats/team/{team_name}- Get detailed team statistics/api/stats/player/{player_name}- Get detailed player statistics
Prediction Endpoints (POST)
/api/predict/matchup- Predict team vs team outcome/api/predict/synergy- Calculate player synergy scores/api/predict/map-preference- Get map advantages for teams/api/predict/role-composition- Get optimal role distributions/api/predict/agent-selection- Get agent recommendations/api/predict/final- Generate comprehensive match prediction
๐ง Usage Example
// Predict a match
fetch('https://your-space.hf.space/api/predict/matchup', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
team_a: 'Sentinels',
team_b: 'Gen.G'
})
})
.then(res => res.json())
.then(data => console.log(data));๐ Response Format
{
"win_probability": 0.52,
"confidence": 0.85,
"components": {
"team_matchup": 0.48,
"player_synergy": 0.55,
"map_advantage": 0.51,
"role_composition": 0.53,
"agent_selection": 0.50,
"individual_form": 0.54
}
}๐ ๏ธ Technical Stack
- Framework: FastAPI
- ML Models: Scikit-learn (pickle format)
- Data Processing: Pandas, NumPy
- Server: Uvicorn
- Deployment: Docker on Hugging Face Spaces
๐ Model Components
- Team Network Model: Analyzes team relationships and historical performance
- Player Synergy Model: Evaluates player compatibility and team chemistry
- Map Selection Model: Predicts map-specific advantages
- Role Composition Model: Optimizes team role distributions
- Agent Selection Model: Recommends optimal agent picks
๐ Frontend Integration
This API is designed to work with the Valorant Predictor React application.
CORS is enabled for all origins. For production, update the CORS settings in app.py:
app.add_middleware(
CORSMiddleware,
allow_origins=["https://your-frontend-domain.com"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)๐ Environment Variables
HF_TOKEN: Hugging Face token for private model access (optional)PORT: Server port (default: 7860)
๐ฆ Status
- โ API Status: Active
- โ Models Loaded: 5/5
- โ Data Files: 12/12
- โ Health Check: Passing
๐ง Contact
For issues or questions, please open an issue on the repository.
Built with โค๏ธ for the VALORANT esports community
