Today I’m going to doing the second part, if you didn’t read the first part go check it out:
I’m summary, Nikita Parris is leaving her team last season Man City, and I need to find players suitable to replace her. I did a bit of an exploratory analysis of Nikita Parris to find what makes her good and what metrics could be used to segment and find similar players. I identified I was going to use:
- Adj Expected Goals Per 90: xG adjusted for the strength of the opposition, if you had a lot of expected goals against weaker opposition its worth less than against stronger opposition.
- Expected Assists: the chances you create for the rest of your team.
- Dribble percentage: how many dribbles doe sthe player complete but the measure is adjusted to account
- Final 3rd Pass Completion: what was the player pass completion rate for passes in the final 3rd of the pitch.
The first task is to create a dataframe with the players and the 4 metrics.
That is the data-frame with the 4 metrics and the players. In total I have 169 players which should mean I find some good options for replacements. The next task is to scale the columns so they can all be compared in the analysis. Also I need to select a number for K.
An elbow plot is used to identity the correct value of k. The point where the slope flattens off and there is an “elbow” is the value for K. Now the first point is 7 however I think that will leave the groups too big therefore I’m going to select the next one at 12 which should leave our clusters smaller so there is a more selective group.
After carrying that out we see that NIkita Parris belongs in cluster 9. Visualising the clusters gives the following plot:
Now with the clusters visualised I can see that cluster 9 has 4 other players in and is significantly separated from rest of the players. There is not too much variation in the other players however in cluster 9 I seem to have good separation.
Here is the list of players in cluster 9. It looks like we have our 3 players to recommend: Fran Kirby, Millie Farrow and Vivianne Miedema. Bremer cant be included as she already plays for Man City so cant be signed to replace Parris. In the final blog of the series I’m going to take these 3 players and go into detail of there strengths and weaknesses through the season.