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.
Cet exercice fait partie du cours
Cluster Analysis in Python
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Set up a random seed in numpy
random.____(____)