3 min readfrom Machine Learning

Built an ML model that predicts UFC fights and use AI to explain why [P]

Our take

As a dedicated UFC fan, I recently embarked on a personal learning project to build a web app that predicts fight outcomes using Machine Learning. The model, achieving an impressive 71.6% accuracy, leverages an XGBoost binary classifier and analyzes various differential features, such as striking and grappling stats, to assess fighter performance. Each prediction is complemented by AI-generated explanations, enhancing user understanding of the underlying data.

The recent exploration of machine learning to predict outcomes in UFC fights demonstrates the exciting potential of AI in transforming how we engage with sports analytics. The web app developed by a passionate UFC fan, achieving an impressive accuracy of 71.6%, illustrates not only the power of data but also the accessibility of machine learning technology for individuals eager to deepen their understanding. This hands-on project reflects a broader trend in which enthusiasts leverage innovative tools to generate insights that were previously the domain of professional analysts. As we witness advancements in AI, such as those discussed in the Conditional formatting for specific character count article, it becomes increasingly clear that these technologies are becoming more user-friendly and approachable.

What stands out in this project is the thoughtful design of the machine learning model, particularly the use of differential features to compare fighters directly rather than relying on absolute statistics. This approach not only enhances the interpretability of the model but also empowers users to understand the nuances of fight dynamics. By focusing on relative advantages—such as striking and grappling metrics—this model provides insights that can inform fans' perspectives on matchups, extending the viewer experience beyond mere fandom to informed engagement. This resonates with ongoing discussions about how AI can simplify complex tasks, as seen in the Does anyone have issue of stock prices stopped updating? article, where users are increasingly seeking reliable tools for real-time data analysis.

Moreover, the integration of SHAP values to explain predictions fosters a deeper understanding of how various factors contribute to fight outcomes. This human-centered approach to data interpretation ensures that users are not just passive recipients of information but active participants in the narrative of each fight. As AI continues to evolve, the ability to demystify predictions will be crucial in enhancing user engagement across various domains, including sports and beyond. The project serves as a reminder that as we innovate, the focus should always remain on enhancing user experience and productivity, rather than solely on sophisticated technology.

Looking ahead, the implications of such projects extend beyond the octagon. As more individuals experiment with AI-driven applications for personal interests, we can anticipate a surge in creative solutions that democratize access to data insights. The question remains: how will these innovations shape the future of not just sports analytics but other fields where data plays a critical role? As technology continues to evolve, the possibilities for transformative solutions are boundless, encouraging us all to explore the future of data management and its potential to empower our decision-making processes.

Been a UFC fan for years and recently had some spare time to build a web app that uses Machine Learning to predict which fighter will win as a learning project.

Surprisingly it does a very good job, the accuracy is around 71.6%, tweaked the algorithm so it factors in each division's dominant fighting style and gives a slight edge to fighters who match it.

The ML pipeline, for those interested:
Model: XGBoost binary classifier (binary:logistic) — predicts whether fighter A wins (1) or fighter B wins (0). Draws/no-contests are excluded from training.

Features (26 total)

The key design choice is differential features — all stats are computed as fighter_A − fighter_B rather than absolute values. This makes SHAP values directly interpretable as relative advantages:

- Striking: SLpM diff, sig. strike accuracy diff, strikes absorbed diff, strike defense diff

- Grappling: TD avg diff, TD accuracy/defense diff, submission avg diff

- Physical: height diff, reach diff

- Record: win rate diff, finish rate diff, KO/TKO rate diff, sub rate diff

- Recent form: wins_last_5 diff, losses_last_5 diff, and a recency-weighted momentum score (most recent fight = 5×, oldest = 1×, normalized to [−1, +1])

- Experience: total fights diff, avg strikes/TDs/control time diff

- Style context: style_win_rate_in_division diff — historical win rate of each fighter's style (striker/wrestler/etc.) in that weight class

- Non-differenced: style encoding for both fighters (kept as a pair to capture matchup interaction), weight class delta (are they cutting/up from their natural division)

Leakage prevention
For each training sample, stats for both fighters are computed using only fights that occurred strictly before that fight's date. No future data bleeds in. All fights are sorted by date; for fight N, only fights 1..N-1 contribute to the feature vector.

Training
- XGBoost: n_estimators=500, max_depth=5, lr=0.05, subsample=0.8, colsample_bytree=0.8, min_child_weight=5, early stopping at patience=50

- 80/20 stratified train/test split

- 5-fold stratified CV to validate generalization

- Metrics: accuracy, ROC-AUC, log-loss

TreeSHAP generates per-feature importance values for each prediction. These are passed to Claude (claude-sonnet-4-6) alongside raw stats to generate a natural language explanation — Claude narrates, never calculates (all numbers come from the deterministic pipeline).

https://ufc-fight-predictor-v1.vercel.app/

Disclaimer: This is a personal learning project, not financial or betting advice. Predictions are based on historical stats and will be wrong plenty of times.

submitted by /u/albaneso
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article