K-Means Clustering
K-Means clustering is an unsupervised modeling technique. Here I will be using the beer_data_set.csv dataset from Kaggle. Using this data I am going to classify the beers into five clusters according to the fields "Min IBU", "Max IBU","Astringency","Body", "Alcohol","Bitter", "Sweet","Sour","Salty", "Fruits", "Hoppy","Spices" and "Malty"
Start by importing the necessary libraries.

Import the data. As this is an unsupervised modeling technique, we do not have a target variable
Create the model. Attach the cluster information to the original dataset and print the centroid information.

Here we can see the centroids.

And finally, having a look at the clusters attached to the original dataset, we can see that different styles of beers would be clustered together. This would indicate that if a person likes a certain type of beer, that person might also like another beer in a different style that has some similar taste profiles.


