Let’s go through the K-Means algorithm using a very simple example. Let’s consider a set of 10 points on a plane and try to group these points into, say, 2 clusters. So let’s see how the K-Means algorithm achieves this goal. [Note: If you don’t know what is meant by Euclidean distance, you’re advised to […]

The next concept that is crucial for understanding how clustering generally works is the idea of centroids. If you remember your high school geometry, centroids are essentially the centre points of triangles. Similarly, in the case of clustering, centroids are the center points of the clusters that are being formed.   Now before going to the […]

Euclidean Distance In the previous segments, you got an idea about how clustering works – it groups the objects on the basis of their similarity or closeness to each other.   Now, the next important thing is to get into the nitty-gritty of how clustering algorithms generally work. You will learn about the 2 types of […]

Cost Function We can measure the accuracy of our hypothesis function by using a cost function. This takes an average difference (actually a fancier version of an average) of all the results of the hypothesis with inputs from x’s and the actual output y’s. J(theta_0, theta_1) = dfrac {1}{2m} displaystyle sum _{i=1}^m left ( hat{y}_{i}- […]

Copyright © 2023 @rajeevranjansinha.com