Exploring the clusters
Because clustering analysis is always in part qualitative, it is incredibly important to have the necessary tools to explore the results of the clustering.
In this exercise you will explore that data frame you created in the previous exercise lineup_k2_complete
.
Reminder: The lineup_k2_complete
data frame contains the x & y positions of 12 players at the start of a 6v6 soccer game to which you have added clustering assignments based on the following parameters:
- Distance: Euclidean
- Number of Clusters (k): 2
- Linkage Method: Complete
Este exercício faz parte do curso
Cluster Analysis in R
Instruções do exercício
- Using
count()
from dplyr, count the number of players assigned to each cluster. - Using
ggplot()
, plot the positions of the players and color them by cluster assignment.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Count the cluster assignments
count(lineup_k2_complete, ___)
# Plot the positions of the players and color them using their cluster
ggplot(lineup_k2_complete, aes(x = ___, y = ___, color = factor(___))) +
geom_point()