Session Ready
Exercise

Visualizing cluster prototypes

In an earlier exercise you found out that K-means with 7 clusters achieves the best Silhouette coefficient among the three clustering algorithms. Wouldn't it be great to visualize the original data and discover where K-means placed the cluster centroids? Moreover, you can compare these centroids to the cluster medoids returned by PAM. Since your dataset only contains three variables, you can easily generate a three-dimensional plot using the plot3D R package.

The mall_scaled data is preloaded in your workspace together with the dplyr and plot3D packages.

The results object returned by clValid is also available. You can access the information about each clustering algorithm via the [email protected] slot.

Instructions 1/4
undefined XP
  • 1
  • 2
  • 3
  • 4
  • Create a 3D scatter plot for the standardized mall_scaled data by calling the points3D() function from the pre-loaded plot3D package. Display the points in blue.