K-Means Clustering in JavaScript

added by JavaScript Kicks
3/4/2015 10:56:59 PM


Clustering is grouping of data or dividing a large data set into smaller data sets of some similarity. A well known clusetering algorithm in unsupervised machine learning is K-Means clustering. The K-Means algorithm takes in n observations (data points), and groups them into k clusters, where each observation belongs to a cluster based on the nearest mean (cluster centroid). The distance between a data point and cluster centroid is calculated using the Euclidean distance.