# Predicting Ice Hockey Goals Using Random Forest and XGBoost
# Predicting Ice Hockey Goals Using Random Forest and XGBoost
## Intro & Background
## Intro & Background
This project explores predicting goals in professional ice hockey using machine learning, focusing on identifying features—especially shot attempts—that most effectively forecast goal-scoring events. Accurate goal prediction is valuable for teams, analysts, and broadcasters aiming to better understand game dynamics. While traditional stats like shot counts provide some insight, machine learning enables deeper, data-driven analysis. The fast-paced nature of ice hockey, with constant possession changes and rapid movement, makes prediction complex. The dataset includes in-game events such as player positions, shot locations, manpower situations, and other contextual game details. Familiarity with hockey concepts like "manpower situation" and "xG" is helpful for interpreting model outcomes.
This project uses machine learning to predict goals in professional ice hockey by analyzing key features like shot attempts. Unlike traditional stats, machine learning offers deeper insights into goal-scoring patterns. Ice hockey’s fastpace and frequent possession changes make accurate prediction challenging. The dataset covers player positions, shot locations, manpower situations, and other game context. Basic understanding of hockey terms like "manpower situation" and "xG" helps interpret the results.
## Algorithms
## Algorithms
We used two tree-based ensemble methods: Random Forest and XGBoost. These were chosen for their strong performance with structured data and ability to handle non-linear feature interactions. Random Forest offers robustness and interpretability, while XGBoost provides optimized boosting performance and fine-tuned control over learning.
We used two tree-based ensemble methods: Random Forest and XGBoost. These were chosen for their strong performance with structured data and ability to handle non-linear feature interactions. Random Forest offers robustness and interpretability, while XGBoost provides optimized boosting performance and fine-tuned control over learning.