Machine Learning Unsupervised
Machine Learning Unsupervised
Here, are prime reasons for using Unsupervised Learning in Machine Learning:
• Unsupervised machine learning finds all kind of unknown patterns in data.
• Unsupervised methods help you to find features which can be useful for
categorization.
• It is taken place in real time, so all the input data to be analyzed and labeled in
the presence of learners.
• It is easier to get unlabeled data from a computer than labeled data, which
needs manual intervention.
clustering
Clustering
Cluster
1
𝐶𝑖= ∑
𝑛 𝑖
𝑥𝑖
• Customer Segmentation
We covered this earlier – one of the most common applications of clustering
Applications is customer segmentation. And it isn’t just limited to banking. This strategy
is across functions, including telecom, e-commerce, sports, advertising,
sales, etc.
of Clustering • Document Clustering
in Real-World This is another common application of clustering. Let’s say you have
multiple documents and you need to cluster similar documents together.
Scenarios Clustering helps us group these documents such that similar documents are
in the same clusters.
• Image Segmentation
We can also use clustering to perform image segmentation. Here, we try to
club similar pixels in the image together. We can apply clustering to create
clusters having similar pixels in the same group.
• Recommendation Engines
Clustering can also be used in recommendation engines. Let’s say you want
to recommend songs to your friends. You can look at the songs liked by that
person and then use clustering to find similar songs and finally recommend
the most similar songs.
Common Distance Measures
Clustering types
K-means clustering
• K-means clustering is a widely used method for cluster analysis where the aim is to
partition a set of objects into K clusters in such a way that the sum of the squared distances
between the objects and their assigned cluster mean is minimized.
• Note that if N is the number of objects, then .
• Step-1: Select the number K to decide the number of
clusters.
K-Means • Step-3: Assign data point to its closest centroid, which will
Algorithm form the predefined K clusters.
A2(2,5)
• Let K1, K2 and K3 be three clusters having centroids A1, A2, A3.
• Take point A4, find the distance of it from centroids of clusters A1,
A3 (8,4) A2 and A3.
A4 (5,8)
A5 (7,5)
A3 (8,4)
A4 (5,8)
A5 (7,5)
• Minimum distance of A5 is with A3. So A5 is added in K3.
A6 (6,4)
A7 (1,2)
• New centroid of K3 is
A8 (4,9)
A1 (2,10) • Take point A6, find the distance of it from all three centroids.
A2(2,5)
A3 (8,4)
A4 (5,8)
A3 (8,4)
A4 (5,8)
A5 (7,5)
A3 (8,4)
A4 (5,8)