K-means is a partitioning clustering technique that aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster. The K-means method requires you to determine the number of clusters at the beginning, unlike hierarchical clustering. However, K-means clustering is much faster than hierarchical clustering as the construction of a hierarchical tree is very time-consuming.
Performing cluster analysis using partitioning clustering
Getting ready
In this recipe, we will continue to use the protein.csv dataset as the input data source to perform K-means clustering. Install and load the following package for cluster visualization:
if(!require...