how cool is thatwe just wrote our own spam classifier just using few lines of code in python it' pretty easy using scikit-learn and python that' naive bayes in actionand you can actually go and classify some spam or ham messages now that you have that under your belt pretty cool stuff let' talk about clustering next -means clustering nextwe're going to talk about -means clusteringand this is an unsupervised learning technique where you have collection of stuff that you want to group together into various clusters maybe it' movie genres or demographics of peoplewho knowsbut it' actually pretty simple ideaso let' see how it works -means clustering is very common technique in machine learning where you just try to take bunch of data and find interesting clusters of things just based on the attributes of the data itself sounds fancybut it' actually pretty simple all we do in -means clustering is try to split our data into groups that' where the comes fromit' how many different groups you're trying to split your data into and it does this by finding centroids sobasicallywhat group given data point belongs to is defined by which of these centroid points it' closest to in your scatter plot you can visualize this in the following image