MulaiMulai sekarang secara gratis

FIFA 18: what makes a complete player?

The overall level of a player in FIFA 18 is defined by six characteristics: pace (pac), shooting (sho), passing (pas), dribbling (dri), defending (def), physical (phy).

Here is a sample card:

Eden Hazard Player Card

In this exercise, you will use all six characteristics to create clusters. The data for this exercise is stored in a pandas DataFrame, fifa. features is the list of these column names and scaled_features is the list of columns which contains their scaled values. The following have been pre-loaded: kmeans, vq from scipy.cluster.vq, matplotlib.pyplot as plt, seaborn as sns.

Before you start the exercise, you may wish to explore scaled_features to check out the list of six scaled columns names.

Latihan ini adalah bagian dari kursus

Cluster Analysis in Python

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Create centroids with kmeans for 2 clusters
cluster_centers,_ = ____
Edit dan Jalankan Kode