xG (Expected Goals) Model
A logistic regression model to predict the probability of a shot resulting in a goal, using a dataset from Hudl Statsbomb containing features such as player locations and quality of the assist.
This required data cleaning, feature engineering and use of variance inflation factor analysis to ensure multicollinearity wasn't an issue. One-hot encoding was done on categorical features, with care taken to avoid the dummy variable trap. In addition, feature scaling was used to ensure no individual feature had too much influence in training.
The logistic regression model was trained using L2 regularisation to prevent overfitting. Predicted probabilities were then calibrated using isotonic regression. Results were analysed using the Brier Score, and produced results close to the industry standard xG provided by Statsbomb.
K.O Heatmaps
In the popular competitive fighting game "Super Smash Bros. Melee", a player's percentage increases each time they are attacked. The higher their percentage, the further they get launched by subsequent attacks. Once a player is knocked outside the bounds of the screen, it results in a K.O.
This app includes:
- Heatmaps showing what percentage and position an attack will ensure a K.O
- The trajectory a character is sent for individual hits.
- "Knockdown" percents for a character.
All algorithms are written in Python, with plots drawn using the libraries MatPlotLib and Seaborn.