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
.
Diese Übung ist Teil des Kurses
Cluster Analysis in Python
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Set up a random seed in numpy
random.____(____)