FIFA 18: defenders revisited
In the FIFA 18 dataset, various attributes of players are present. Two such attributes are:
- defending: a number which signifies the defending attributes of a player
- physical: a number which signifies the physical attributes of a player
These are typically defense-minded players. In this exercise, you will perform clustering based on these attributes in the data.
The following modules have been pre-loaded: kmeans
, vq
from scipy.cluster.vq
, matplotlib.pyplot
as plt
, seaborn
as sns
. The data for this exercise is stored in a pandas DataFrame, fifa
. The scaled variables are scaled_def
and scaled_phy
.
This exercise is part of the course
Cluster Analysis in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Set up a random seed in numpy
random.____(____)