{"id":415,"date":"2018-08-27T11:58:36","date_gmt":"2018-08-27T11:58:36","guid":{"rendered":"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=415"},"modified":"2019-01-02T07:30:52","modified_gmt":"2019-01-02T07:30:52","slug":"introduction-to-clustering","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/chapter\/introduction-to-clustering\/","title":{"rendered":"Introduction to Clustering"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/0-0Yecrme68\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Welcome to the e-PG Pathshala Lecture Series on Machine Learning.In this module we will discuss clustering, a very important function of machine learning called clustering. We will discuss the broad categories of clustering with illustrative examples.<\/p>\r\n&nbsp;\r\n\r\n<strong>Learning Objectives:<\/strong>\r\n\r\n&nbsp;\r\n\r\nThe learning objectives of this module are as follows:\r\n\r\n&nbsp;\r\n\r\n\u2022 To understand Clustering and its applications\r\n\r\n\u2022 To understand Hierarchical Clustering\r\n\r\n\u2022 To understand Agglomerative Clustering with an Illustrative Example\r\n\r\n&nbsp;\r\n\r\n<strong>23.1Introduction<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Clustering is the most important <strong>unsupervised learning<\/strong>approach associated with machine learning. It can be viewed as a method for <strong>data exploration<\/strong>which essentially means looking for patterns or structures in the data space that may be of interest in a collection of unlabeled data. Essentially no classes are associated with data instances a priori as in the case of supervised learning.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Now let us look at simplistic definition of clustering. Clustering can be defined as the method of organizing data instances into groups based on their similarity. In other words a cluster is a collection or group of data instances that are similar to each other and dissimilar to data instances belonging to other clusters.<\/p>\r\n&nbsp;\r\n\r\n<strong>23.1.1 Natural Grouping -Clustering is subjective<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A set of data instances or samples can be grouped differently based on different criteria or features, in other words clustering is subjective. Figure 23.1 shows a set of seven people. They have been grouped into three clusters based on whether they are school employees, they belong to a family or based on the gender. Therefore choosing the attributes or features based on which\u00a0<span style=\"text-align: initial;font-size: 1em\">clustering is to be carried out is an important aspect of clustering just as it was for classification.<\/span><\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-416 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-278.png\" alt=\"\" width=\"581\" height=\"303\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>Criteria 23.1.2 Clusters \u2013 Distance viewpoint<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">When we are given a set of instances or examples represented as a set of points, we need to define the notion of distance between these points. We then group the points into some number of clusters, such that members of a cluster are close or similar to each other while members of different clusters are dissimilar or farther apart than members belonging to the same cluster. Figure 23.2 shows a data set that has three natural clusters where the data points group together based on the distance. An outlier is a data point that is isolated from all other data points.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-417 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-279.png\" alt=\"\" width=\"437\" height=\"372\" \/>\r\n\r\n<strong>23.2 Applications of Clustering<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In the context of machine learning, clustering is one of the functions that has many interesting applications. One of the applications of clustering is for understanding. Understanding is achieved through appropriate grouping. Grouping related documents for browsing, grouping genes and proteins that have similar functionality, or grouping stocks with similar price fluctuations are some examples that help in understanding the commonalities and differences between groups. Another use of clustering is in summarization, in other words we reduce the size of large data sets. Some examples of clustering are shown in Figure 23.3 (a) and (b). The example in Figure 23.3 (a) shows how Google news uses clustering of news articles to help in better presentation of news. In fact by using appropriate features for clustering we can also bring out a personalized presentation. Figure 23.3 (b) shows the use of clustering to show areas clustered based on the amount of precipitation<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-418 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-280.png\" alt=\"\" width=\"575\" height=\"281\" \/>\r\n<p style=\"text-align: justify\">Let us see some real-life examples of clustering. When designing T-shirts making them to fit each person is too expensive while one-size-fits-all is not a satisfactory policy. We could group people with similar sizes to design \u201csmall\u201d, \u201cmedium\u201d and \u201clarge\u201d T-shirts. Example 1: groups people of similar sizes together to make \u201csmall\u201d, \u201cmedium\u201d and \u201clarge\u201d T-Shirts.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">In today\u2019s world of online marketing, segmenting customers according to their similarities would help in targeted marketing. Features such as previous products bought, effect of discounts etc.. could be used for such marketing.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Another example of clustering is in document clustering where given a collection of text documents, we cancluster them according to their content similarities in order to create a topic hierarchy.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">As we can see from the varied applications clustering is one of the most utilized data mining techniques. In image processing it is used to cluster images based on their visual content. In the web scenario it is used to cluster groups of users based on their access patterns on webpages or cluster searchers based on their search behavior or to cluster webpages based on their content and links. In bioinformatics clustering can be used to group similar proteins based on similarity of their chemical structure and\/or functionality. It has been used in almost every field, e.g., medicine, psychology, botany, sociology, biology, archeology, marketing, insurance, libraries, etc. Due to the large increase of online documents text clustering is now becoming very important.<\/p>\r\n&nbsp;\r\n\r\n<strong>23.3 Aspects of clustering<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In general clustering deals with high dimensional data. Example of such data include text documents and images. Dealing with such high dimensional data is an important aspect of clustering. Another important aspect that influences the effectiveness of clustering is the choice of distance function or the similarity or dissimilarity measure used. The basic clustering algorithms can be divided into two types namely hierarchicalclustering and partitional clustering. The choice of which type and which algorithm is another important aspect of clustering. We also need to decide on the parameters to evaluate clustering quality. In general the algorithms strive to maximize inter-cluster distance and minimize intra-clusterdistance (Figure 23.4). In other words the quality of clustering depends on the algorithm used, the distance function selected , and the application for which it is to be used.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-419 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-281.png\" alt=\"\" width=\"415\" height=\"325\" \/>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>23.3.1 High Dimensional Data<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Often as we discussed clustering needs to deal with high dimensional data where given a cloud of data points we want to understand its structure.<span style=\"text-align: initial;font-size: 1em\">Clustering needs to capture the structure using some dimensionality techniques and then performing clustering (Figure 23.5).<\/span><\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-420 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-282.png\" alt=\"\" width=\"530\" height=\"252\" \/>\r\n\r\n<strong>23.4 Similarity Measures<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">As we have already discussed clustering is the grouping together of \u201csimilar\u201d data. Choosing an appropriate (dis)similarity measure is a critical step in clustering. Similarity measure is often described as the inverse of the distance function that is less the distance more is the similarity. There are many distance functions for the different types of data such as numeric data, nominal data etc. Distance measures can also be defined specifically for different applications.<\/p>\r\n&nbsp;\r\n\r\n<strong>23.4.1 Distance functions for Numeric Attributes<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In general in the case of numeric attributes distance is denoted as<em>dist<\/em>(x<em>i<\/em>, x<em>j<\/em>), where x<em>i<\/em> and x<em>j<\/em> are data points. Please note that these data points can be vectors. The most commonly used distance functions in this context are Euclidean distance and Manhattan (city block) distance. These two distance functions are special cases of Minkowski distance.<\/p>\r\n&nbsp;\r\n\r\n<strong>23.4.1.1<\/strong>\u00a0\u00a0\u00a0\u00a0 <strong>Minkowski Distance<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Given below is the Minkowski distance, where h is any positive integer. In other words the distance between two data points xi and xj is defined as the hth root of the sum of the difference between them in each dimension taken to the power of h.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-421 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-283.png\" alt=\"\" width=\"504\" height=\"89\" \/>\r\n\r\n<strong>23.4.1.2 Euclidean Distance<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In the case of Euclidean distance h=2.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-422 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-284.png\" alt=\"\" width=\"450\" height=\"57\" \/>\r\n<p style=\"text-align: justify\">In other words Euclidean distance between two data points xi and xj is the square root of the sum of the squares of the difference between them in each dimension. This is one of the most commonly used distance function for clustering data points with numerical attributes<\/p>\r\n&nbsp;\r\n\r\n<strong>23.4.1.3 Manhattan Distance<\/strong>\r\n\r\n&nbsp;\r\n\r\nIn the case of Manhattan distance h=1.\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-423 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-285.png\" alt=\"\" width=\"453\" height=\"57\" \/>\r\n<p style=\"text-align: justify\">Here the sum of the weights w1,w2,\u2026wr =1 In the case of weighted Euclidean distance the difference between the data points in each dimension is weighted. Each dimension in the vector representing the points corresponds to different attributes or features so this essentially means that we can weight each feature according to its importance in defining the cluster.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>23.4.1.5<\/strong>\u00a0<strong>Chebychev distance<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">This distance is equal to the maximum difference between the values of any one of the attributes and the distance measure is given as:<\/p>\r\n<img class=\"size-full wp-image-424 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-286.png\" alt=\"\" width=\"468\" height=\"49\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>23.4.2<\/strong>\u00a0<strong>Distance functions for BinaryAttributes<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Binary attributes have two values or states but no ordering relationships, e.g., attribute gender has two values male and female.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">In the case of binary attributes normally a confusion matrix is used where the <em>i<\/em>th and <em>j<\/em>th data points are represented asvectors x<em>i<\/em> and x<em>j<\/em> (Figure 23.6).We use a confusion matrix to introduce the distance functions\/measures.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-425 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-287.png\" alt=\"\" width=\"357\" height=\"228\" \/>\r\n<p style=\"text-align: justify\">In Figure 23.6 \u201ca\u201d corresponds to the number of attributes with the value of 0 for both data pointsx<em>i<\/em> and x<em>j<\/em>, \u201cb\u201d corresponds to 0 for x<em>i<\/em><em>and 1 for<\/em> x<em>j<\/em>, \u201cc\u201d corresponds to 1 for x<em>i<\/em><em>and 0 for<\/em> x<em>j<\/em>, while \u201cd\u201d corresponds to the number of attributes with the value of 1 for both data pointsx<em>i<\/em> and x<em>j<\/em>,<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">The confusion matrix can be used when the binary attribute is symmetric that is if both states (0 and 1) have equal importance, and carry the same weights. Then the distance function is the proportion of mismatches of their values:<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">dist(x<em>i<\/em>,x<em>j<\/em><em>)<\/em> = (b+c)\/(a+b+c+d)<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">However sometimes the binary attributes are asymmetric that is one of the states is more important than the other. We assume that state 1 represents the important state in which case the Jaccard measure using the confusion matrix can be defined as:<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">JDist(x<em>i<\/em>,x<em>j<\/em><em>)<\/em> = (b+c)\/(a+b+c)<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">For text documents normally we usecosine similarity which is a similarity measure not a distance measure.Cosine similarity is a measure of similarity between two vectors obtained by measuring the cosine of the angle between them (Figure 23.7). The similarity between any two given documents <em>d<\/em><em>j<\/em> and <em>d<\/em><em>k<\/em>, represented as vectors is given as:<\/p>\r\n<img class=\"size-full wp-image-426 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-288.png\" alt=\"\" width=\"458\" height=\"117\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In this case wi is a weight probably based on the frequency of words in the documents.<\/p>\r\n<img class=\"size-full wp-image-427 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-289.png\" alt=\"\" width=\"408\" height=\"265\" \/>\r\n<p style=\"text-align: justify\">The result of the Cosine function is equal to 1 when the angle is 0, and it is less than 1 when the angle is of any other value. As the angle between the vectors decreases, the cosine value approaches 1, that is the two vectors are closer, and the similarity between the documents increases.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>23.5 Methods of Clustering<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">The basic method of clustering is the hierarchical method which is of two types agglomerative and divisive. Agglomerative clustering is a bottom up method where initially we assume that each data point is by itself a cluster. Then we repeatedly combine the two \u201cnearest\u201d clusters into one. On the other hand divisive clustering is a top down procedure where we start with one cluster and recursively split the clusters until no more division is possible. We normally carry out point assignment where we maintain a set of clusters and allocate points to nearest cluster.<\/p>\r\n&nbsp;\r\n\r\n<strong>23.6<\/strong>\u00a0\u00a0\u00a0 <strong>Hierarchical Clustering<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In the hierarchical clustering approach we carry out partitioning of the data set in a sequential manner. The approach constructs nested partitions layer by layer by grouping objects into a tree of clusters (Figure 23.8). In this context there is no need to know the number of clusters in advance. In general the distance matrix is used as the clustering criteria.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-428 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-290.png\" alt=\"\" width=\"391\" height=\"221\" \/>\r\n\r\n<strong>23.6.1 Types of Hierarchical Clustering<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Hierarchical clustering methods can be further classified as either agglomerative or divisive, depending on whether the hierarchical decomposition is formed in a bottom-up (merging) or top-down (splitting) fashion. As we have discussed the hierarchical approach sequentially partitions the data points and constructs a tree of clusters. The following are two sequential clustering strategies for constructing the tree of clusters. The important issues in both cases are cluster distance to be considered and the termination condition to be used.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>23.6.1.1 Agglomerative Clustering<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Agglomerative clustering is a bottom-up strategy where initially each data pointforms its own (atomic) cluster. We then merge these atomic clusters into larger and larger clusters based on some distance metric. The algorithm terminates when all the data points are in a single cluster or merging is continued until certain termination conditions are satisfied. Most hierarchical clustering methods belong to this category.Agglomerative and divisive clustering on the data set {a, b, c, d ,e } is shown in Figure 23.9.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>23.6.1.2<\/strong>\u00a0 <strong>Divisive Clustering<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Divisive clustering is a top-down strategywhich does the reverse of agglomerative hierarchical clustering where initially all data points together form a single cluster. Then the cluster is subdivided into smaller and smaller clusters based on some distance metric.It subdivides the clusters into smaller and smaller pieces, until it satisfies certain termination conditions, such as a desired number of cluster or the diameter of each cluster is within a certain threshold<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-429 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-291.png\" alt=\"\" width=\"565\" height=\"253\" \/>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>23.7 Hierarchical Clustering: The Algorithm<\/strong>\r\n\r\n<\/div>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Hierarchical clustering takes as input a set of points. It then creates a tree in which the points are leaves and the internal nodes reveal the similarity structure of the points.The tree is often called a \u201cdendogram.\u201dThe method is summarized below:<\/p>\r\n\r\n<ul>\r\n \t<li>Place all points into their own clusters<\/li>\r\n \t<li>While there is more than one cluster, do<\/li>\r\n \t<li>Merge the closest pair of clusters<\/li>\r\n<\/ul>\r\nThe behavior of the algorithm depends on how \u201cclosest pair of clusters\u201d is defined\r\n\r\n&nbsp;\r\n\r\n<strong>23.8Hierarchical Clustering: Merging Clusters<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Now an importantcriteria for merging clusters is the cluster distance. There are three different ways in which this cluster distance can be defined.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>Single Link:<\/strong>In this case the distance between two clusters is the distance between the closest points in the clusters (Figure 23.10 (a)). This method is also called neighbor joining. The cluster distance d(Ci, Cj) between the clusters Ciand Cj in the case of single link is given as minimum distance between the data points xip and xjqin the two clusters.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">d(Ci, Cj) = min{d(xip, xjq)}<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>Average Link:<\/strong>In this case the distance between two clusters is the distance between the cluster centroids (Figure 23.10 (b)).The cluster distance d(Ci, Cj) between the clusters Ciand Cj in the case of single link is given as averagedistance between the data points xip and xjqin the two clusters.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">d(Ci, Cj) = avg{d(xip, xjq)}<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>Complete Link:<\/strong>In this case the distance between two clusters is the distance between the farthest pair of points (Figure 23.10 (c)). The cluster distance d(Ci, Cj) between the clusters Ciand Cj in the case of single link is given as minimum distance between the data points xip and xjqin the two clusters.<\/p>\r\n&nbsp;\r\n\r\nd(Ci, Cj) = max{d(xip, xjq)}\r\n\r\n<img class=\"size-full wp-image-430 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-292.png\" alt=\"\" width=\"468\" height=\"260\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 23.10 Cluster Distance Measures<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">The distance calculation is also illustrated in Figure 23.11.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-431 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-293.png\" alt=\"\" width=\"360\" height=\"251\" \/>\r\n<p style=\"text-align: justify\"><strong>Example<\/strong>: Given a data set of five objects characterised by a single feature, assume that there are two clusters: C1: {a, b} and C2: {c, d, e}. Assume that we are given the distance matrix. Calculate three cluster distances between C1 and C2.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-432 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-294.png\" alt=\"\" width=\"286\" height=\"275\" \/>\r\n\r\n<img class=\"size-full wp-image-433 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-295.png\" alt=\"\" width=\"561\" height=\"212\" \/>\r\n\r\n<img class=\"size-full wp-image-434 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-296.png\" alt=\"\" width=\"604\" height=\"140\" \/>\r\n\r\n<strong>23.9 Agglomerative Algorithm<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The <em>Agglomerative<\/em> algorithm is a type of hierarchical clustering algorithm that can be carried out in three steps (Figure 23.13):<\/p>\r\n\r\n<ul>\r\n \t<li style=\"text-align: justify\">Convert object attributes to distance matrix<\/li>\r\n \t<li style=\"text-align: justify\">Set each object as a cluster (thus if we have <em>N<\/em> objects, we will have <em>N <\/em>clusters at the beginning)<\/li>\r\n \t<li style=\"text-align: justify\">Repeat until number of cluster is one (or known # of clusters)<\/li>\r\n \t<li style=\"text-align: justify\">Merge two closest clusters o Update distance matrix<\/li>\r\n \t<li>Update distance matrix<\/li>\r\n<\/ul>\r\n<img class=\"size-full wp-image-435 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-297.png\" alt=\"\" width=\"379\" height=\"375\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>23.10 Clustering Example using Agglomerative Algorithm<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Example illustrates single-link clustering in Euclidean space on 6 data points.Let us explain the example. Initially we start with A, B, C, D, E and F. We merge clusters D and F into cluster (D, F) at distance 0.50 Then we merge cluster A and cluster B into (A, B) at distance 0.71 We merge clusters E and (D, F) into ((D, F), E) at distance 1.00. Then we merge clusters ((D, F), E) and C into (((D, F), E), C) at distance 1.41. We merge clusters (((D, F), E), C) and\u00a0(A, B) into ((((D, F), E), C), (A, B)) at distance 2.50. The last cluster contains all the data points and hence we conclude the computation.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-436 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-298.png\" alt=\"\" width=\"500\" height=\"248\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>23.10 Issues associated with Hierarchical Clustering<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">As we have already seen the key operation associated with hierarchical clustering is - Repeatedly combining the two nearest clusters<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>23.10.1 Representation of cluster of many data points<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">As you merge clusters, how do you represent the \u201clocation\u201d of each cluster, to tell which pair of clusters is closest? One solution is the <strong>Euclidean case where<\/strong> each cluster is associated with a <strong><em>centroid<\/em><\/strong>which is the average of its datapoints.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">However in the non-Euclidean case, we cannot talk about locations and we cannot talk about average of two points and therefore we need other approaches. In this case we define clusteroid to represent a cluster of data points. Clusteroid is defined as the data point closest to other points. The concept of closeness can be defined in various ways such as smallest maximum distance to other points, smallest average distance to other points or as smallest sum of squares of distances to other points.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Centroid is the avg. of all (data)points in the cluster. This means centroid is an \u201cartificial\u201d point. However clusteroid is an existing (data) point that is \u201cclosest\u201d to all other points in the cluster (Figure 23.15).<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-437 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-299.png\" alt=\"\" width=\"449\" height=\"218\" \/>\r\n\r\n<strong>23.10.2 Definition of \u201cnearness\u201d of clusters?<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">When we are dealing with Euclidean space we generally measure cluster distances or nearness of clusters by determining the distances between centroids of the clusters. In the case of non-Euclideancase thedefined clusteroids are treated as centroids to find inter cluster distances.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Nearness can also be defined using other approaches. One such approach could be by using i<strong>ntercluster distance<\/strong> which is defined as the minimum of the distances between any two points, one from each cluster<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-438 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-300.png\" alt=\"\" width=\"287\" height=\"84\" \/>\r\n<p style=\"text-align: justify\">The third approach is using the concept of \u201ccohesion\u201d of clusters, for example the maximum distance from the clusteroid and we merge clusters whose union is most cohesive.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">We will now define the concept of cohesiveness. Cohesion itself can be defined using the diameter of the merged cluster which is the maximum distance between points in the cluster. Another notion of cohesion is the use of the average distancebetween points in the cluster. A density based cohesion takes the diameter or average distanceand divide it by the number of points in the cluster.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>23.10.3 Stopping Criteria for combining clusters<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Normally\u00a0\u00a0 we\u00a0\u00a0\u00a0 can\u00a0\u00a0 stop\u00a0\u00a0\u00a0 when we have clusters.\u00a0\u00a0 Another\u00a0\u00a0 approach\u00a0\u00a0 is to stop when the cohesion of the cluster resulting from the best merger falls below a threshold. Finally we could\u00a0stop when there is a sudden jump in the cohesion value.<\/p>\r\n&nbsp;\r\n\r\n<strong>23.11 Example-Agglomerative Algorithm<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">We will now illustrate the agglomerative algorithm using an example. . Let us assume that we have 6 data points (A, B, C, D, E and F). The data points, the initial data matrix and distance matrix is shown in Figure 23.16 (a). In the first iteration, from the distance matrix we find that the data points D and F are the closest with minimum Euclidean distance (0.50).Now we merge the two data points D and F to form the cluster (D,F) (Figure 23.16 (b)) and update the distance matrix accordingly ( Figure 23.16 (c)).<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">In the second iteration, in the updated matrix, we find that the data points A and B are the closest with minimum Euclidean distance (0.71). Now we merge the two data points A and B to form the cluster (A,B) (Figure 23.16 (d)). In iteration\u00a03, we merge cluster (D,F) and data point E to form the new data point ((D,F),E) and update the distance matrix accordingly (Figure 23.16 (e)).<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">In the 4th iteration, we merge two clusters ((D,F),E) and C to form the new cluster (((D,F),E),C) and update the distance matrix accordingly (Figure 23.16 (f)). The final result is shown in (Figure 23.16 (g)).<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><img class=\"size-full wp-image-439 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-301.png\" alt=\"\" width=\"492\" height=\"460\" \/><\/p>\r\n<img class=\"size-full wp-image-440 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-302.png\" alt=\"\" width=\"476\" height=\"481\" \/>\r\n\r\n<img class=\"size-full wp-image-442 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-304.png\" alt=\"\" width=\"639\" height=\"335\" \/>\r\n\r\n<img class=\"size-full wp-image-443 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-305.png\" alt=\"\" width=\"645\" height=\"352\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>Summary<\/strong>\r\n<ul>\r\n \t<li>Explained Clustering and its applications<\/li>\r\n \t<li>Discussed Hierarchical Clustering along with different distance measures<\/li>\r\n \t<li>Explained Agglomerative Clustering with an Illustrative Example<\/li>\r\n<\/ul>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Introduction to Clustering<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/0-0Yecrme68\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<strong>Web Links<\/strong>\r\n<ul>\r\n \t<li style=\"text-align: justify\">https:\/\/en.wikipedia.org\/wiki\/Clustering<\/li>\r\n \t<li style=\"text-align: justify\">http:\/\/home.deib.polimi.it\/matteucc\/Clustering\/tutorial_html\/<\/li>\r\n \t<li style=\"text-align: justify\">http:\/\/scikitlearn.org\/stable\/modules\/clustering.html<\/li>\r\n \t<li style=\"text-align: justify\">http:\/\/www.webopedia.com\/TERM\/C\/clustering.html<\/li>\r\n \t<li style=\"text-align: justify\">http:\/\/web.stanford.edu\/group\/sherlocklab\/tutorial.html<\/li>\r\n \t<li style=\"text-align: justify\">http:\/\/www.ibm.com\/developerworks\/aix\/tutorials\/clustering\/clustering.html<\/li>\r\n \t<li style=\"text-align: justify\">https:\/\/web.stanford.edu\/class\/cs345a\/slides\/12-clustering.pdf<\/li>\r\n<\/ul>\r\n<p style=\"text-align: justify\"><strong>Supporting &amp; Reference Materials<\/strong><\/p>\r\n\r\n<ul>\r\n \t<li style=\"text-align: justify\">www.cs.cmu.edu\/afs\/andrew\/course\/15\/381-f08\/www\/...\/clustering.pdf.<\/li>\r\n \t<li style=\"text-align: justify\">Data Clustering: Algorithms and Applications (Chapman &amp; Hall\/CRC Data Mining and Knowledge Discovery Series) Hardcover\u2013 Import, 29 Aug 2013<\/li>\r\n \t<li style=\"text-align: justify\">Intelligent Text Categorization And Clustering, 2014<\/li>\r\n<\/ul>","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/0-0Yecrme68\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Welcome to the e-PG Pathshala Lecture Series on Machine Learning.In this module we will discuss clustering, a very important function of machine learning called clustering. We will discuss the broad categories of clustering with illustrative examples.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Learning Objectives:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>The learning objectives of this module are as follows:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022 To understand Clustering and its applications<\/p>\n<p>\u2022 To understand Hierarchical Clustering<\/p>\n<p>\u2022 To understand Agglomerative Clustering with an Illustrative Example<\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.1Introduction<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Clustering is the most important <strong>unsupervised learning<\/strong>approach associated with machine learning. It can be viewed as a method for <strong>data exploration<\/strong>which essentially means looking for patterns or structures in the data space that may be of interest in a collection of unlabeled data. Essentially no classes are associated with data instances a priori as in the case of supervised learning.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Now let us look at simplistic definition of clustering. Clustering can be defined as the method of organizing data instances into groups based on their similarity. In other words a cluster is a collection or group of data instances that are similar to each other and dissimilar to data instances belonging to other clusters.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.1.1 Natural Grouping -Clustering is subjective<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A set of data instances or samples can be grouped differently based on different criteria or features, in other words clustering is subjective. Figure 23.1 shows a set of seven people. They have been grouped into three clusters based on whether they are school employees, they belong to a family or based on the gender. Therefore choosing the attributes or features based on which\u00a0<span style=\"text-align: initial;font-size: 1em\">clustering is to be carried out is an important aspect of clustering just as it was for classification.<\/span><\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-416 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-278.png\" alt=\"\" width=\"581\" height=\"303\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-278.png 581w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-278-300x156.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-278-65x34.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-278-225x117.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-278-350x183.png 350w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Criteria 23.1.2 Clusters \u2013 Distance viewpoint<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">When we are given a set of instances or examples represented as a set of points, we need to define the notion of distance between these points. We then group the points into some number of clusters, such that members of a cluster are close or similar to each other while members of different clusters are dissimilar or farther apart than members belonging to the same cluster. Figure 23.2 shows a data set that has three natural clusters where the data points group together based on the distance. An outlier is a data point that is isolated from all other data points.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-417 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-279.png\" alt=\"\" width=\"437\" height=\"372\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-279.png 437w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-279-300x255.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-279-65x55.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-279-225x192.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-279-350x298.png 350w\" sizes=\"auto, (max-width: 437px) 100vw, 437px\" \/><\/p>\n<p><strong>23.2 Applications of Clustering<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In the context of machine learning, clustering is one of the functions that has many interesting applications. One of the applications of clustering is for understanding. Understanding is achieved through appropriate grouping. Grouping related documents for browsing, grouping genes and proteins that have similar functionality, or grouping stocks with similar price fluctuations are some examples that help in understanding the commonalities and differences between groups. Another use of clustering is in summarization, in other words we reduce the size of large data sets. Some examples of clustering are shown in Figure 23.3 (a) and (b). The example in Figure 23.3 (a) shows how Google news uses clustering of news articles to help in better presentation of news. In fact by using appropriate features for clustering we can also bring out a personalized presentation. Figure 23.3 (b) shows the use of clustering to show areas clustered based on the amount of precipitation<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-418 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-280.png\" alt=\"\" width=\"575\" height=\"281\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-280.png 575w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-280-300x147.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-280-65x32.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-280-225x110.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-280-350x171.png 350w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/p>\n<p style=\"text-align: justify\">Let us see some real-life examples of clustering. When designing T-shirts making them to fit each person is too expensive while one-size-fits-all is not a satisfactory policy. We could group people with similar sizes to design \u201csmall\u201d, \u201cmedium\u201d and \u201clarge\u201d T-shirts. Example 1: groups people of similar sizes together to make \u201csmall\u201d, \u201cmedium\u201d and \u201clarge\u201d T-Shirts.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In today\u2019s world of online marketing, segmenting customers according to their similarities would help in targeted marketing. Features such as previous products bought, effect of discounts etc.. could be used for such marketing.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Another example of clustering is in document clustering where given a collection of text documents, we cancluster them according to their content similarities in order to create a topic hierarchy.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">As we can see from the varied applications clustering is one of the most utilized data mining techniques. In image processing it is used to cluster images based on their visual content. In the web scenario it is used to cluster groups of users based on their access patterns on webpages or cluster searchers based on their search behavior or to cluster webpages based on their content and links. In bioinformatics clustering can be used to group similar proteins based on similarity of their chemical structure and\/or functionality. It has been used in almost every field, e.g., medicine, psychology, botany, sociology, biology, archeology, marketing, insurance, libraries, etc. Due to the large increase of online documents text clustering is now becoming very important.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.3 Aspects of clustering<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In general clustering deals with high dimensional data. Example of such data include text documents and images. Dealing with such high dimensional data is an important aspect of clustering. Another important aspect that influences the effectiveness of clustering is the choice of distance function or the similarity or dissimilarity measure used. The basic clustering algorithms can be divided into two types namely hierarchicalclustering and partitional clustering. The choice of which type and which algorithm is another important aspect of clustering. We also need to decide on the parameters to evaluate clustering quality. In general the algorithms strive to maximize inter-cluster distance and minimize intra-clusterdistance (Figure 23.4). In other words the quality of clustering depends on the algorithm used, the distance function selected , and the application for which it is to be used.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-419 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-281.png\" alt=\"\" width=\"415\" height=\"325\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-281.png 415w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-281-300x235.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-281-65x51.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-281-225x176.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-281-350x274.png 350w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>23.3.1 High Dimensional Data<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Often as we discussed clustering needs to deal with high dimensional data where given a cloud of data points we want to understand its structure.<span style=\"text-align: initial;font-size: 1em\">Clustering needs to capture the structure using some dimensionality techniques and then performing clustering (Figure 23.5).<\/span><\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-420 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-282.png\" alt=\"\" width=\"530\" height=\"252\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-282.png 530w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-282-300x143.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-282-65x31.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-282-225x107.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-282-350x166.png 350w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/p>\n<p><strong>23.4 Similarity Measures<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">As we have already discussed clustering is the grouping together of \u201csimilar\u201d data. Choosing an appropriate (dis)similarity measure is a critical step in clustering. Similarity measure is often described as the inverse of the distance function that is less the distance more is the similarity. There are many distance functions for the different types of data such as numeric data, nominal data etc. Distance measures can also be defined specifically for different applications.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.4.1 Distance functions for Numeric Attributes<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In general in the case of numeric attributes distance is denoted as<em>dist<\/em>(x<em>i<\/em>, x<em>j<\/em>), where x<em>i<\/em> and x<em>j<\/em> are data points. Please note that these data points can be vectors. The most commonly used distance functions in this context are Euclidean distance and Manhattan (city block) distance. These two distance functions are special cases of Minkowski distance.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.4.1.1<\/strong>\u00a0\u00a0\u00a0\u00a0 <strong>Minkowski Distance<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Given below is the Minkowski distance, where h is any positive integer. In other words the distance between two data points xi and xj is defined as the hth root of the sum of the difference between them in each dimension taken to the power of h.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-421 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-283.png\" alt=\"\" width=\"504\" height=\"89\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-283.png 504w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-283-300x53.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-283-65x11.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-283-225x40.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-283-350x62.png 350w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/p>\n<p><strong>23.4.1.2 Euclidean Distance<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In the case of Euclidean distance h=2.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-422 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-284.png\" alt=\"\" width=\"450\" height=\"57\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-284.png 450w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-284-300x38.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-284-65x8.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-284-225x29.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-284-350x44.png 350w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/p>\n<p style=\"text-align: justify\">In other words Euclidean distance between two data points xi and xj is the square root of the sum of the squares of the difference between them in each dimension. This is one of the most commonly used distance function for clustering data points with numerical attributes<\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.4.1.3 Manhattan Distance<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>In the case of Manhattan distance h=1.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-423 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-285.png\" alt=\"\" width=\"453\" height=\"57\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-285.png 453w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-285-300x38.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-285-65x8.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-285-225x28.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-285-350x44.png 350w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/p>\n<p style=\"text-align: justify\">Here the sum of the weights w1,w2,\u2026wr =1 In the case of weighted Euclidean distance the difference between the data points in each dimension is weighted. Each dimension in the vector representing the points corresponds to different attributes or features so this essentially means that we can weight each feature according to its importance in defining the cluster.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>23.4.1.5<\/strong>\u00a0<strong>Chebychev distance<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">This distance is equal to the maximum difference between the values of any one of the attributes and the distance measure is given as:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-424 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-286.png\" alt=\"\" width=\"468\" height=\"49\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-286.png 468w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-286-300x31.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-286-65x7.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-286-225x24.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-286-350x37.png 350w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.4.2<\/strong>\u00a0<strong>Distance functions for BinaryAttributes<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Binary attributes have two values or states but no ordering relationships, e.g., attribute gender has two values male and female.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In the case of binary attributes normally a confusion matrix is used where the <em>i<\/em>th and <em>j<\/em>th data points are represented asvectors x<em>i<\/em> and x<em>j<\/em> (Figure 23.6).We use a confusion matrix to introduce the distance functions\/measures.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-425 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-287.png\" alt=\"\" width=\"357\" height=\"228\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-287.png 357w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-287-300x192.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-287-65x42.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-287-225x144.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-287-350x224.png 350w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><\/p>\n<p style=\"text-align: justify\">In Figure 23.6 \u201ca\u201d corresponds to the number of attributes with the value of 0 for both data pointsx<em>i<\/em> and x<em>j<\/em>, \u201cb\u201d corresponds to 0 for x<em>i<\/em><em>and 1 for<\/em> x<em>j<\/em>, \u201cc\u201d corresponds to 1 for x<em>i<\/em><em>and 0 for<\/em> x<em>j<\/em>, while \u201cd\u201d corresponds to the number of attributes with the value of 1 for both data pointsx<em>i<\/em> and x<em>j<\/em>,<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The confusion matrix can be used when the binary attribute is symmetric that is if both states (0 and 1) have equal importance, and carry the same weights. Then the distance function is the proportion of mismatches of their values:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">dist(x<em>i<\/em>,x<em>j<\/em><em>)<\/em> = (b+c)\/(a+b+c+d)<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">However sometimes the binary attributes are asymmetric that is one of the states is more important than the other. We assume that state 1 represents the important state in which case the Jaccard measure using the confusion matrix can be defined as:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">JDist(x<em>i<\/em>,x<em>j<\/em><em>)<\/em> = (b+c)\/(a+b+c)<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">For text documents normally we usecosine similarity which is a similarity measure not a distance measure.Cosine similarity is a measure of similarity between two vectors obtained by measuring the cosine of the angle between them (Figure 23.7). The similarity between any two given documents <em>d<\/em><em>j<\/em> and <em>d<\/em><em>k<\/em>, represented as vectors is given as:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-426 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-288.png\" alt=\"\" width=\"458\" height=\"117\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-288.png 458w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-288-300x77.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-288-65x17.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-288-225x57.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-288-350x89.png 350w\" sizes=\"auto, (max-width: 458px) 100vw, 458px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In this case wi is a weight probably based on the frequency of words in the documents.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-427 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-289.png\" alt=\"\" width=\"408\" height=\"265\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-289.png 408w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-289-300x195.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-289-65x42.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-289-225x146.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-289-350x227.png 350w\" sizes=\"auto, (max-width: 408px) 100vw, 408px\" \/><\/p>\n<p style=\"text-align: justify\">The result of the Cosine function is equal to 1 when the angle is 0, and it is less than 1 when the angle is of any other value. As the angle between the vectors decreases, the cosine value approaches 1, that is the two vectors are closer, and the similarity between the documents increases.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>23.5 Methods of Clustering<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The basic method of clustering is the hierarchical method which is of two types agglomerative and divisive. Agglomerative clustering is a bottom up method where initially we assume that each data point is by itself a cluster. Then we repeatedly combine the two \u201cnearest\u201d clusters into one. On the other hand divisive clustering is a top down procedure where we start with one cluster and recursively split the clusters until no more division is possible. We normally carry out point assignment where we maintain a set of clusters and allocate points to nearest cluster.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.6<\/strong>\u00a0\u00a0\u00a0 <strong>Hierarchical Clustering<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In the hierarchical clustering approach we carry out partitioning of the data set in a sequential manner. The approach constructs nested partitions layer by layer by grouping objects into a tree of clusters (Figure 23.8). In this context there is no need to know the number of clusters in advance. In general the distance matrix is used as the clustering criteria.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-428 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-290.png\" alt=\"\" width=\"391\" height=\"221\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-290.png 391w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-290-300x170.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-290-65x37.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-290-225x127.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-290-350x198.png 350w\" sizes=\"auto, (max-width: 391px) 100vw, 391px\" \/><\/p>\n<p><strong>23.6.1 Types of Hierarchical Clustering<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Hierarchical clustering methods can be further classified as either agglomerative or divisive, depending on whether the hierarchical decomposition is formed in a bottom-up (merging) or top-down (splitting) fashion. As we have discussed the hierarchical approach sequentially partitions the data points and constructs a tree of clusters. The following are two sequential clustering strategies for constructing the tree of clusters. The important issues in both cases are cluster distance to be considered and the termination condition to be used.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>23.6.1.1 Agglomerative Clustering<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Agglomerative clustering is a bottom-up strategy where initially each data pointforms its own (atomic) cluster. We then merge these atomic clusters into larger and larger clusters based on some distance metric. The algorithm terminates when all the data points are in a single cluster or merging is continued until certain termination conditions are satisfied. Most hierarchical clustering methods belong to this category.Agglomerative and divisive clustering on the data set {a, b, c, d ,e } is shown in Figure 23.9.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>23.6.1.2<\/strong>\u00a0 <strong>Divisive Clustering<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Divisive clustering is a top-down strategywhich does the reverse of agglomerative hierarchical clustering where initially all data points together form a single cluster. Then the cluster is subdivided into smaller and smaller clusters based on some distance metric.It subdivides the clusters into smaller and smaller pieces, until it satisfies certain termination conditions, such as a desired number of cluster or the diameter of each cluster is within a certain threshold<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-429 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-291.png\" alt=\"\" width=\"565\" height=\"253\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-291.png 565w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-291-300x134.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-291-65x29.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-291-225x101.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-291-350x157.png 350w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>23.7 Hierarchical Clustering: The Algorithm<\/strong><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Hierarchical clustering takes as input a set of points. It then creates a tree in which the points are leaves and the internal nodes reveal the similarity structure of the points.The tree is often called a \u201cdendogram.\u201dThe method is summarized below:<\/p>\n<ul>\n<li>Place all points into their own clusters<\/li>\n<li>While there is more than one cluster, do<\/li>\n<li>Merge the closest pair of clusters<\/li>\n<\/ul>\n<p>The behavior of the algorithm depends on how \u201cclosest pair of clusters\u201d is defined<\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.8Hierarchical Clustering: Merging Clusters<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Now an importantcriteria for merging clusters is the cluster distance. There are three different ways in which this cluster distance can be defined.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>Single Link:<\/strong>In this case the distance between two clusters is the distance between the closest points in the clusters (Figure 23.10 (a)). This method is also called neighbor joining. The cluster distance d(Ci, Cj) between the clusters Ciand Cj in the case of single link is given as minimum distance between the data points xip and xjqin the two clusters.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">d(Ci, Cj) = min{d(xip, xjq)}<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>Average Link:<\/strong>In this case the distance between two clusters is the distance between the cluster centroids (Figure 23.10 (b)).The cluster distance d(Ci, Cj) between the clusters Ciand Cj in the case of single link is given as averagedistance between the data points xip and xjqin the two clusters.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">d(Ci, Cj) = avg{d(xip, xjq)}<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>Complete Link:<\/strong>In this case the distance between two clusters is the distance between the farthest pair of points (Figure 23.10 (c)). The cluster distance d(Ci, Cj) between the clusters Ciand Cj in the case of single link is given as minimum distance between the data points xip and xjqin the two clusters.<\/p>\n<p>&nbsp;<\/p>\n<p>d(Ci, Cj) = max{d(xip, xjq)}<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-430 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-292.png\" alt=\"\" width=\"468\" height=\"260\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-292.png 468w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-292-300x167.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-292-65x36.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-292-225x125.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-292-350x194.png 350w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 23.10 Cluster Distance Measures<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The distance calculation is also illustrated in Figure 23.11.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-431 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-293.png\" alt=\"\" width=\"360\" height=\"251\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-293.png 360w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-293-300x209.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-293-65x45.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-293-225x157.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-293-350x244.png 350w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/><\/p>\n<p style=\"text-align: justify\"><strong>Example<\/strong>: Given a data set of five objects characterised by a single feature, assume that there are two clusters: C1: {a, b} and C2: {c, d, e}. Assume that we are given the distance matrix. Calculate three cluster distances between C1 and C2.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-432 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-294.png\" alt=\"\" width=\"286\" height=\"275\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-294.png 286w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-294-65x63.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-294-225x216.png 225w\" sizes=\"auto, (max-width: 286px) 100vw, 286px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-433 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-295.png\" alt=\"\" width=\"561\" height=\"212\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-295.png 561w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-295-300x113.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-295-65x25.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-295-225x85.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-295-350x132.png 350w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-434 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-296.png\" alt=\"\" width=\"604\" height=\"140\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-296.png 604w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-296-300x70.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-296-65x15.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-296-225x52.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-296-350x81.png 350w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/p>\n<p><strong>23.9 Agglomerative Algorithm<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The <em>Agglomerative<\/em> algorithm is a type of hierarchical clustering algorithm that can be carried out in three steps (Figure 23.13):<\/p>\n<ul>\n<li style=\"text-align: justify\">Convert object attributes to distance matrix<\/li>\n<li style=\"text-align: justify\">Set each object as a cluster (thus if we have <em>N<\/em> objects, we will have <em>N <\/em>clusters at the beginning)<\/li>\n<li style=\"text-align: justify\">Repeat until number of cluster is one (or known # of clusters)<\/li>\n<li style=\"text-align: justify\">Merge two closest clusters o Update distance matrix<\/li>\n<li>Update distance matrix<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-435 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-297.png\" alt=\"\" width=\"379\" height=\"375\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-297.png 379w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-297-300x297.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-297-65x64.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-297-225x223.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-297-350x346.png 350w\" sizes=\"auto, (max-width: 379px) 100vw, 379px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.10 Clustering Example using Agglomerative Algorithm<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Example illustrates single-link clustering in Euclidean space on 6 data points.Let us explain the example. Initially we start with A, B, C, D, E and F. We merge clusters D and F into cluster (D, F) at distance 0.50 Then we merge cluster A and cluster B into (A, B) at distance 0.71 We merge clusters E and (D, F) into ((D, F), E) at distance 1.00. Then we merge clusters ((D, F), E) and C into (((D, F), E), C) at distance 1.41. We merge clusters (((D, F), E), C) and\u00a0(A, B) into ((((D, F), E), C), (A, B)) at distance 2.50. The last cluster contains all the data points and hence we conclude the computation.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-436 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-298.png\" alt=\"\" width=\"500\" height=\"248\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-298.png 500w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-298-300x149.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-298-65x32.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-298-225x112.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-298-350x174.png 350w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.10 Issues associated with Hierarchical Clustering<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">As we have already seen the key operation associated with hierarchical clustering is &#8211; Repeatedly combining the two nearest clusters<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>23.10.1 Representation of cluster of many data points<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">As you merge clusters, how do you represent the \u201clocation\u201d of each cluster, to tell which pair of clusters is closest? One solution is the <strong>Euclidean case where<\/strong> each cluster is associated with a <strong><em>centroid<\/em><\/strong>which is the average of its datapoints.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">However in the non-Euclidean case, we cannot talk about locations and we cannot talk about average of two points and therefore we need other approaches. In this case we define clusteroid to represent a cluster of data points. Clusteroid is defined as the data point closest to other points. The concept of closeness can be defined in various ways such as smallest maximum distance to other points, smallest average distance to other points or as smallest sum of squares of distances to other points.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Centroid is the avg. of all (data)points in the cluster. This means centroid is an \u201cartificial\u201d point. However clusteroid is an existing (data) point that is \u201cclosest\u201d to all other points in the cluster (Figure 23.15).<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-437 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-299.png\" alt=\"\" width=\"449\" height=\"218\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-299.png 449w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-299-300x146.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-299-65x32.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-299-225x109.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-299-350x170.png 350w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/p>\n<p><strong>23.10.2 Definition of \u201cnearness\u201d of clusters?<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">When we are dealing with Euclidean space we generally measure cluster distances or nearness of clusters by determining the distances between centroids of the clusters. In the case of non-Euclideancase thedefined clusteroids are treated as centroids to find inter cluster distances.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Nearness can also be defined using other approaches. One such approach could be by using i<strong>ntercluster distance<\/strong> which is defined as the minimum of the distances between any two points, one from each cluster<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-438 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-300.png\" alt=\"\" width=\"287\" height=\"84\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-300.png 287w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-300-65x19.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-300-225x66.png 225w\" sizes=\"auto, (max-width: 287px) 100vw, 287px\" \/><\/p>\n<p style=\"text-align: justify\">The third approach is using the concept of \u201ccohesion\u201d of clusters, for example the maximum distance from the clusteroid and we merge clusters whose union is most cohesive.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">We will now define the concept of cohesiveness. Cohesion itself can be defined using the diameter of the merged cluster which is the maximum distance between points in the cluster. Another notion of cohesion is the use of the average distancebetween points in the cluster. A density based cohesion takes the diameter or average distanceand divide it by the number of points in the cluster.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>23.10.3 Stopping Criteria for combining clusters<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Normally\u00a0\u00a0 we\u00a0\u00a0\u00a0 can\u00a0\u00a0 stop\u00a0\u00a0\u00a0 when we have clusters.\u00a0\u00a0 Another\u00a0\u00a0 approach\u00a0\u00a0 is to stop when the cohesion of the cluster resulting from the best merger falls below a threshold. Finally we could\u00a0stop when there is a sudden jump in the cohesion value.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>23.11 Example-Agglomerative Algorithm<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">We will now illustrate the agglomerative algorithm using an example. . Let us assume that we have 6 data points (A, B, C, D, E and F). The data points, the initial data matrix and distance matrix is shown in Figure 23.16 (a). In the first iteration, from the distance matrix we find that the data points D and F are the closest with minimum Euclidean distance (0.50).Now we merge the two data points D and F to form the cluster (D,F) (Figure 23.16 (b)) and update the distance matrix accordingly ( Figure 23.16 (c)).<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In the second iteration, in the updated matrix, we find that the data points A and B are the closest with minimum Euclidean distance (0.71). Now we merge the two data points A and B to form the cluster (A,B) (Figure 23.16 (d)). In iteration\u00a03, we merge cluster (D,F) and data point E to form the new data point ((D,F),E) and update the distance matrix accordingly (Figure 23.16 (e)).<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In the 4th iteration, we merge two clusters ((D,F),E) and C to form the new cluster (((D,F),E),C) and update the distance matrix accordingly (Figure 23.16 (f)). The final result is shown in (Figure 23.16 (g)).<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-439 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-301.png\" alt=\"\" width=\"492\" height=\"460\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-301.png 492w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-301-300x280.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-301-65x61.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-301-225x210.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-301-350x327.png 350w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-440 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-302.png\" alt=\"\" width=\"476\" height=\"481\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-302.png 476w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-302-297x300.png 297w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-302-65x66.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-302-225x227.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-302-350x354.png 350w\" sizes=\"auto, (max-width: 476px) 100vw, 476px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-442 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-304.png\" alt=\"\" width=\"639\" height=\"335\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-304.png 639w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-304-300x157.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-304-65x34.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-304-225x118.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-304-350x183.png 350w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-443 aligncenter\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-305.png\" alt=\"\" width=\"645\" height=\"352\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-305.png 645w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-305-300x164.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-305-65x35.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-305-225x123.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2018\/08\/Untitled-305-350x191.png 350w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Summary<\/strong><\/p>\n<ul>\n<li>Explained Clustering and its applications<\/li>\n<li>Discussed Hierarchical Clustering along with different distance measures<\/li>\n<li>Explained Agglomerative Clustering with an Illustrative Example<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Introduction to Clustering<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/0-0Yecrme68\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Web Links<\/strong><\/p>\n<ul>\n<li style=\"text-align: justify\">https:\/\/en.wikipedia.org\/wiki\/Clustering<\/li>\n<li style=\"text-align: justify\">http:\/\/home.deib.polimi.it\/matteucc\/Clustering\/tutorial_html\/<\/li>\n<li style=\"text-align: justify\">http:\/\/scikitlearn.org\/stable\/modules\/clustering.html<\/li>\n<li style=\"text-align: justify\">http:\/\/www.webopedia.com\/TERM\/C\/clustering.html<\/li>\n<li style=\"text-align: justify\">http:\/\/web.stanford.edu\/group\/sherlocklab\/tutorial.html<\/li>\n<li style=\"text-align: justify\">http:\/\/www.ibm.com\/developerworks\/aix\/tutorials\/clustering\/clustering.html<\/li>\n<li style=\"text-align: justify\">https:\/\/web.stanford.edu\/class\/cs345a\/slides\/12-clustering.pdf<\/li>\n<\/ul>\n<p style=\"text-align: justify\"><strong>Supporting &amp; Reference Materials<\/strong><\/p>\n<ul>\n<li style=\"text-align: justify\">www.cs.cmu.edu\/afs\/andrew\/course\/15\/381-f08\/www\/&#8230;\/clustering.pdf.<\/li>\n<li style=\"text-align: justify\">Data Clustering: Algorithms and Applications (Chapman &amp; Hall\/CRC Data Mining and Knowledge Discovery Series) Hardcover\u2013 Import, 29 Aug 2013<\/li>\n<li style=\"text-align: justify\">Intelligent Text Categorization And Clustering, 2014<\/li>\n<\/ul>\n","protected":false},"author":3,"menu_order":22,"template":"","meta":{"_acf_changed":false,"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-415","chapter","type-chapter","status-publish","hentry"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":8,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters\/415\/revisions"}],"predecessor-version":[{"id":501,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters\/415\/revisions\/501"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters\/415\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapter-type?post=415"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/contributor?post=415"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/license?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}