Unsupervised Learning: K-means clustering

Clustering:

In unsupervised learning, the training set does not include the labels, instead, contains the features.
Thus, a common training set is as follows:

Training set: \[{X1, X2, X3, ................., Xm}\], where each Xi denotes a vector with n features.

K-means algorithm:

Image result for k means algorithm andrew ng

Suppose that we want to classify the data into two clusters. The approach that we use in K means clustering is:


  • We feed in the data and the number of groups (K), here two.
  • Randomly initialize K cluster points mu1, mu2, ....... muK, here only two
  • Then assign the points in the data to one of these, based on to which point they are closer to, here, to one of the two points based on the proximities.
  • Now for each developed group, calculate their means and assign the centroids to these means.
  • Now again, assign ever point to one of these points (called as centroids) and again calculate means.
  • Repeat this until two consecutive assignment results into the same arrangement.

No comments:

Post a Comment

Installing albert on ubuntu 19.04

Installing Albert on Ubuntu 19.04... Albert is not still released for ubuntu 19.04. But still, you can install it using the following ...