As we learned in Chaps. 7, 8, and 9, classification could help us make predictions on new observations. However, classification requires (human supervised) predefined label classes. What if we are in the early phases of a study and/or don’t have the required resources to manually define, derive or generate these class labels?

Clustering can help us explore the dataset and separate cases into groups representing similar traits or characteristics. Each group could be a potential candidate for a class. Clustering is used for exploratory data analytics, i.e., as unsupervised learning, rather than for confirmatory analytics or for predicting specific outcomes.

In this chapter, we will present (1) clustering as a machine learning task, (2) the silhouette plots for classification evaluation, (3) the k-Means clustering algorithm and how to tune it, (4) examples of several interesting case-studies, including Divorce and Consequences on Young Adults, Pediatric Trauma, and Youth Development, (5) demonstrate hierarchical clustering, and (6) Gaussian mixture modeling.

13.1 Clustering as a Machine Learning Task

As we mentioned before, clustering represents classification of unlabeled cases. Scatter plots depict a simple illustration of the clustering process. Assume we don’t know much about the ingredients of frankfurter hot dogs and we have the following graph (Fig. 13.1).

figure a
Fig. 13.1
figure 1

Hotdogs dataset – scatterplot of calories and sodium content blocked by type of meat

In terms of calories and sodium, these hot dogs are clearly separated into three different clusters. Cluster 1 has hot dogs of low calories and medium sodium content; Cluster 2 has both calorie and sodium at medium levels; Cluster 3 has both sodium and calories at high levels. We can make a bold guess about the meats used in these three clusters of hot dogs. For Cluster 1, it could be mostly chicken meat since it has low calories. The second cluster might be beef, and the third one is likely to be pork, because beef hot dogs have considerably less calories and salt than pork hot dogs. However, this is just guessing. Some hot dogs have a mixture of two or three types of meat. The real situation is somewhat similar to what we guessed but with some random noise, especially in Cluster 2.

The following two plots show the primary type of meat used for each hot dog labeled by name (top) and color-coded (bottom) (Figs. 13.2 and 13.3).

Fig. 13.2
figure 2

Scatterplot of calories and sodium content with meat type labels

Fig. 13.3
figure 3

An alternative scatterplot of the hotdogs calories and sodium

13.2 Silhouette Plots

Silhouette plots are useful for interpretation and validation of consistency of all clustering algorithms. The silhouette value, ∈[−1, 1], measures the similarity (cohesion) of a data point to its cluster relative to other clusters (separation). Silhouette plots rely on a distance metric, e.g., the Euclidean distance, Manhattan distance, Minkowski distance, etc.

  • High silhouette value suggest that the data matches its own cluster well.

  • A clustering algorithm performs well when most Silhouette values are high.

  • Low value indicates poor matching within the neighboring cluster.

  • Poor clustering may imply that the algorithm configuration may have too many or too few clusters.

Suppose a clustering method groups all data points (objects), {Xi}i, into k clusters and define:

  • di as the average dissimilarity of Xi with all other data points within its cluster. di captures the quality of the assignment of Xi to its current class label. Smaller or larger di values suggest better or worse overall assignment for Xi to its cluster, respectively. The average dissimilarity of Xi to a cluster C is the average distance between Xi and all points in the cluster of points labeled C.

  • li as the lowest average dissimilarity of Xi to any other cluster, that Xi is not a member of. The cluster corresponding to li, the lowest average dissimilarity, is called the Xi neighboring cluster, as it is the next best fit cluster for Xi.

Then, the silhouette of Xi is defined by:

$$ -1\le {s}_i=\frac{l_i-{d}_i}{\max \left\{{l}_i,{d}_i\right\}}\equiv \left\{\begin{array}{ll}1-\frac{d_i}{l_i},& \mathrm{if}\ {d}_i<{l}_i\\ {}0,& \mathrm{if}\ {d}_i={l}_i\\ {}\frac{l_i}{d_i}-1,& \mathrm{if}\ {d}_i>{l}_i\end{array}\right.. $$

Note that:

  • −1 ≤ si ≤ 1,

  • si → 1 when di ≪ li, i.e., the dissimilarity of Xi to its cluster, C is much lower relative to its dissimilarity to other clusters, indicating a good (cluster assignment) match. Thus, high Silhouette values imply the data is appropriately clustered.

  • Conversely, −1 ← si when li ≪ di, di is large, implying a poor match of Xi with its current cluster C, relative to neighboring clusters. Xi may be more appropriately clustered in its neighboring cluster.

  • si ∼ 0 means that the Xi may lie on the border between two natural clusters.

13.3 The k-Means Clustering Algorithm

The k-means algorithm is one of the most commonly used algorithms for clustering.

13.3.1 Using Distance to Assign and Update Clusters

This algorithm is similar to k-nearest neighbor s (KNN) presented in Chap. 7. In clustering, we don’t have a priori pre-determined labels, and the algorithm is trying to deduce intrinsic groupings in the data.

Similar to KNN, k-means uses Euclidean distance (‖2 norm) most of the times, however Manhattan distance (‖1 norm), or the more general Minkowski distance \( \left({\left({\sum}_{i=1}^n{\left|{p}_i-{q}_i\right|}^c\right)}^{\frac{1}{c}}\right) \) may also be used. For c = 2, the Minkowski distance represents the classical Euclidean distance:

$$ dist\left(x,y\right)=\sqrt{\sum \limits_{n=1}^n{\left({x}_i-{y}_i\right)}^2}. $$

How can we separate clusters using this formula? The k-means protocol is as follows:

  • Initiation: First, we define k points as cluster centers. Often these points are k random points from the dataset. For example, if k = 3, we choose three random points in the dataset as cluster centers.

  • Assignment: Second, we determine the maximum extent of the cluster boundaries that all have maximal distance from their cluster centers. Now the data is separated into k initial clusters. The assignment of each observation to a cluster is based on computing the least within-cluster sum of squares according to the chosen distance. Mathematically, this is equivalent to Voronoi tessellation of the space of the observations according to their mean distances.

  • Update: Third, we update the centers of our clusters to new means of the cluster centroid locations. This updating phase is the essence of the k-means algorithm.

Although there is no guarantee that the k-means algorithm converges to a global optimum, in practice, the algorithm tends to converge, i.e., the assignments no longer change, to a local minimum as there are only a finite number of such Voronoi partitionings.

13.3.2 Choosing the Appropriate Number of Clusters

We don’t want our number of clusters to be either too large or too small. If it is too large, the groups are too specific to be meaningful. On the other hand, too few groups might be too broadly general to be useful. As we mentioned in Chap. 7, \( k=\sqrt{\frac{n}{2}} \) is a good place to start. However, it might generate a large number of groups. Also, the elbow method may be used to determine the relationship of k and homogeneity of the observations of each cluster. When we graph within-group homogeneity against k, we can find an “elbow point” that suggests a minimum k corresponding to relatively large within-group homogeneity (Fig. 13.4).

Fig. 13.4
figure 4

Elbow plot of the within-group homogeneity against the number of groups parameter (k)

This graph shows that homogeneity barely increases above the “elbow point”. There are various ways to measure homogeneity within a cluster. For detailed explanations please read On clustering validation techniques, Journal of Intelligent Information Systems Vol. 17, pp. 107–145, by M. Halkidi, Y. Batistakis, and M. Vazirgiannis (2001).

13.4 Case Study 1: Divorce and Consequences on Young Adults

13.4.1 Step 1: Collecting Data

The dataset we will be using is the Divorce and Consequences on Young Adults dataset. This is a longitudinal study focused on examining the consequences of recent parental divorce for young adults (initially ages 18–23) whose parents had divorced within 15 months of the study’s first wave (1990–91). The sample consisted of 257 White respondents with newly divorced parents. Here we have a subset of this dataset with 47 respondents in our case-studies folder, CaseStudy01_Divorce_YoungAdults_Data.csv.

13.4.1.1 Variables

  • DIVYEAR: Year in which parents were divorced. Dichotomous variable with 1989 and 1990.

  • Child affective relations:

    • Momint: Mother intimacy. Interval level data with four possible responses (1-extremely close, 2-quite close, 3-fairly close, 4- not close at all).

    • Dadint: Father intimacy. Interval level data with four possible responses (1-extremely close, 2-quite close, 3-fairly close, 4-not close at all).

    • Live with mom: Polytomous variable with three categories (1- mother only, 2- father only, 3- both parents).

  • momclose: measure of how close the child is to the mother (1-extremely close, 2-quite close, 3-fairly close, 4-not close at all).

  • Depression: Interval level data regarding feelings of depression in the past 4 weeks. Possible responses are 1-often, 2-sometimes, 3-hardly ever, 4-never.

  • Gethitched: Polytomous variable with four possible categories indicating respondent’s plan for marriage (1-Marry fairly soon, 2-marry sometime, 3-never marry, 8-don’t know).

13.4.2 Step 2: Exploring and Preparing the Data

Let’s load the dataset and pull out a summary of all variables.

figure b

According to the summary, DIVYEAR is actually a dummy variable (either 89 or 90). We can recode (binarize) the DIVYEAR using the ifelse() function (mentioned in Chap. 8). The following line of code generates a new indicator variable for divorce year = 1990.

figure c

We also need another preprocessing step to deal with livewithmom, which has missing values, livewithmom = 9. We can impute these using momint and dadint variables for each specific participant

figure d

For instance, respondents that feel much closer to their dads may be assigned divorce$livewithmom==2, suggesting they most likely live with their fathers. Of course, alternative imputation strategies are also possible.

figure e

13.4.3 Step 3: Training a Model on the Data

We are only using R base functionality, so no need to install any additional packages now, however library(stats) may still be necessary. Then, the function kmeans() will provide the k-means clustering of the data.

myclusters<-kmeans(mydata, k)

  • mydata: dataset in a matrix form.

  • k: number of clusters we want to create.

  • output:

    • myclusters$cluster: vector indicating the cluster number for every observation.

    • myclusters$center: a matrix showing the mean feature values for every center.

    • mycluster$size: a table showing how many observations are assigned to each cluster.

Before we perform clustering, we need to standardize the features to avoid biasing the clustering based on features that use large-scale values. Note that distance calculations are sensitive to measuring units. The method as.data.frame() will convert our dataset into a data frame allowing us to use the lapply() function. Next, we use a combination of lapply() and scale() to standardize our data.

figure f

The resulting dataset, di_z, is standardized so all features are unitless and follow approximately standardized normal distribution.

Next, we need to think about selecting a proper k. We have a relatively small dataset with 47 observations. Obviously we cannot have a k as large as 10. The rule of thumb suggests \( k=\sqrt{47/2}=4.8 \). This would be relatively large also because we will have less than 10 observations for each cluster. It is very likely that for some clusters we only have one observation. A better choice may be 3. Let’s see if this will work.

figure g

13.4.4 Step 4: Evaluating Model Performance

Let’s look at the clusters created by the k-means model.

diz_clussters$ size ## [1] 12 24 11

At first glance, it seems that 3 worked well for the number of clusters. We don’t have any cluster that contains a small number of observations. The three clusters have relatively equal number of respondents.

Silhouette plots represent the most appropriate evaluation strategy to assess the quality of the clustering. Silhouette values are between −1 and 1. In our case, two data points correspond to negative Silhouette values, suggesting these cases may be “mis-clustered” or perhaps are ambiguous, as the Silhouette value is close to 0. We can observe that the average Silhouette is reasonable, about 0.2 (Fig. 13.5).

figure h
Fig. 13.5
figure 5

Silhouette plot for the 3 classes

The next step would be to interpret the clusters in the context of this social study.

figure i

This result shows:

  • Cluster 1: divyear = mostly 90, momint = very close, dadint = not close, livewithmom = mostly mother, depression = not often, (gethiched) marry = will likely not get married. Cluster 1 represents mostly adolescents that are closer to mom than dad. These young adults do not often feel depressed and they may avoid getting married. These young adults tends to be not be too emotional and do not value family.

  • Cluster 2: divyear = mostly 89, momint = not close, dadint = very close, livewithmom = father, depression = mild, marry = do not know/not inclined. Cluster 2 includes children that mostly live with dad and only feel close to dad. These people don’t felt severely depressed and are not inclined to marry. These young adults may prefer freedom and tend to be more naive.

  • Cluster 3: divyear = mix of 89 and 90, momint = not close, dadint = not at all, livewithmom = mother, depression = sometimes, marry = tend to get married. Cluster 3 contains children that did not feel close to either dad or mom. They sometimes felt depressed and are willing to build their own family. These young adults seem to be more independent.

We can see that these three different clusters do contain three alternative types of young adults. Bar plots provide an alternative strategy to visualize the difference between clusters (Fig. 13.6).

figure j
Fig. 13.6
figure 6

Barplot illustrating the features discriminating between the three cohorts in the divorce sonsequences on young adults dataset

For each of the three clusters, the bars in the plot above represent the following order of features DIVYEAR, momint, dadint, momclose, depression, livewithmom, gethitched.

13.4.5 Step 5: Usage of Cluster Information

Clustering results could be utilized as new information augmenting the original dataset. For instance, we can add a cluster label in our divorce dataset:

figure k

We can also examine the relationship between live with mom and feel close to mom by displaying a scatter plot of these two variables. If we suspect that young adults’ personality might affect this relationship, then we could consider the potential personality (cluster type) in the plot. The cluster labels associated with each participant are printed in different positions relative to each pair of observations, (livewithmom, momint) (Fig. 13.7).

figure l
Fig. 13.7
figure 7

Drill down for one feature (leave-with-mom) between the three cohorts

We used ggplot() function in ggplot2 package to label points with cluster types. ggplot(divorce, aes(livewithmom, momint)) + geom_point() gives us the scatterplot, and the three geom_text() functions help us label the points with the corresponding cluster identifiers.

This picture shows that live with mom does not necessarily mean young adults will feel close to mom. For “emotional” (Cluster 1) young adults, they felt close to their mom whether they live with their mom or not. “Naive” (Cluster 2) young adults feel closer to mom if they live with mom. However, they tend to be estranged from their mother. “Independent” (Cluster 3) young adults are opposite to Cluster 1. They felt closer to mom if they don’t live with her.

13.5 Model Improvement

Let’s still use the divorce data to illustrate a model improvement using k-means++. (Appropriate) initialization of the k-means algorithm is of paramount importance. The k-means++ extension provides a practical strategy to obtain an optimal initialization for k-means clustering using a predefined kpp_init method.

figure m
figure n

We can observe some differences.

figure o

This improvement is not substantial; the new overall average Silhouette value remains 0.2 for k-means++. Third compares to the value of 0.2 reported for the earlier k-means clustering, albeit the three groups generated by each method are quite distinct. In addition, the number of “mis-clustered” instances remains 2 although their Silhouette values are rather smaller than before, and the overall Cluster 1 Silhouette average value is low (0.006) (Fig. 13.8).

figure p
Fig. 13.8
figure 8

Silhouette plot for k-means++ classification

13.5.1 Tuning the Parameter k

Similar to what we performed for KNN and SVM, we can tune the k-means parameters, including centers initialization and k (Fig. 13.9).

figure r
Fig. 13.9
figure 9

Evolution of the average silhouette value with respect to the number of clusters

This suggests that k ∼ 3 may be an appropriate number of clusters to use in this case.

Next, let’s set the maximal iteration of the algorithm and rerun the model with optimal k = 2, k = 3 or k = 10. Below, we just demonstrate the results for k = 3. There are still 2 mis-clustered observations, which is not a significant improvement on the prior model according to the average Silhouette measure (Fig. 13.10).

figure s
Fig. 13.10
figure 10

Silhouette plot for the optimal k = 3 andd Initialization

Note that we now see 3 cases of group 1 that have negative silhouette values (previously we had only 2), albeit the overall average silhouette remains 0.2.

13.6 Case Study 2: Pediatric Trauma

Let’s go through another example demonstrating the k-means clustering method using a larger dataset.

13.6.1 Step 1: Collecting Data

The dataset we will interrogate now includes Services Utilization by Trauma-Exposed Children in the US data, which is located in our case-studies folder. This case study examines associations between post-traumatic psychopathology and service utilization by trauma-exposed children.

Variables:

  • id: Case identification number.

  • sex: Female or male, dichotomous variable (1 = female, 0 = male).

  • age: Age of child at time of seeking treatment services. Interval-level variable, score range = 0–18.

  • race: Race of child seeking treatment services. Polytomous variable with 4 categories (1 = black, 2 = white, 3 = hispanic, 4 = other).

  • cmt: The child was exposed to child maltreatment trauma - dichotomous variable (1 = yes, 0 = no).

  • traumatype: Type of trauma exposure the child is seeking treatment sore. Polytomous variable with 5 categories ("sexabuse" = sexual abuse, "physabuse" = physical abuse, "neglect" = neglect, "psychabuse" = psychological or emotional abuse, "dvexp" = exposure to domestic violence or intimate partner violence).

  • ptsd: The child has current post-traumatic stress disorder. Dichotomous variable (1 = yes, 0 = no).

  • dissoc: The child currently has a dissociative disorder (PTSD dissociative subtype, DESNOS, DDNOS). Interval-level variable, score range = 0–11.

  • service: Number of services the child has utilized in the past 6 months, including primary care, emergency room, outpatient therapy, outpatient psychiatrist, inpatient admission, case management, in-home counseling, group home, foster care, treatment foster care, therapeutic recreation or mentor, department of social services, residential treatment center, school counselor, special classes or school, detention center or jail, probation officer. Interval-level variable, score range = 0–19.

  • Note: These data (Case_04_ChildTrauma._Data.csv) are tab-delimited.

13.6.2 Step 2: Exploring and Preparing the Data

First, we need to load the dataset into R and report its summary and dimensions.

figure t

In the summary we see two factors race and traumatype. Traumatype codes the real classes we are interested in. If the clusters created by the model are quite similar to the trauma types, our model may have a quite reasonable interpretation. Let’s also create a dummy variable for each racial category.

figure u

Then, we will remove traumatype the class variable from the dataset to avoid biasing the clustering algorithm. Thus, we are simulating a real biomedical case-study where we do not necessarily have the actual class information available, i.e., classes are latent features.

figure v

13.6.3 Step 3: Training a Model on the Data

Similar to case-study 1, let’s standardize the dataset and fit a k-means model.

figure w

Here we use k = 6 in the hope that we may have 5 of these clusters match the specific 5 trauma types. In this case study, we have 1000 observations and k = 6 may be a reasonable option.

13.6.4 Step 4: Evaluating Model Performance

To assess the clustering model results, we can examine the resulting clusters (Fig. 13.11).

Fig. 13.11
figure 11

Key predictors discriminating between the 6 cohorts in the trauma study

figure x

On this barplot, the bars in each cluster represents sex, age, ses, ptsd, dissoc, service, black, hispanic, other, and white, respectively. It is quite obvious that each cluster has some unique features.

Next, we can compare the k-means computed cluster labels to the original labels. Let’s evaluate the similarities between the automated cluster labels and their real class counterparts using a confusion matrix table, where rows represent the k-means clusters, columns show the actual labels, and the cell values include the frequencies of the corresponding pairings.

figure y

We can see that all of the children in Cluster 4 belong to dvexp (exposure to domestic violence or intimate partner violence). If we use the mode of each cluster to be the class for that group of children, we can classify 63 sexabuse cases, 279 neglect cases, 41 physabuse cases, 100 dvexp cases, and another 71 neglect cases. That is 554 cases out of 1,000 cases identified with correct class. The model has a problem in distinguishing between neglect and psychabuse, but it has a good accuracy.

Let’s review the output Silhouette value summary. It works well as only a small portion of samples appear mis-clustered.

figure z

Next, let’s try to tune k with k-means++ and see if k = 6 appears to be optimal (Fig. 13.12).

Fig. 13.12
figure 12

Evolution of the average silhouette value with respect to the number of clusters

figure aa

Finally, let’s use k-means++ with k = 6 and set the algorithm’s maximal iteration before rerunning the experiment:

figure ab

13.6.5 Practice Problem: Youth Development

Use the Boys Town Study of Youth Development data, second case study, CaseStudy02_Boystown_Data.csv, which we used in Chap. 7, to find clusters using variables like GPA, alcohol abuse, attitudes on drinking, social status, parent closeness, and delinquency for clustering (all variables other than gender and ID).

First, we must load the data and transfer sex, dadjob, and momjob into dummy variables.

figure ac

Then, extract all the variables, except the first two columns (subject identifiers and genders).

figure ad

Next, we need to standardize and clustering the data with k = 3. You may have the following centers (numbers could be a little different) (Fig. 13.13).

figure ae
Fig. 13.13
figure 13

Main features discriminating between the 3 cohorts in the divorce impact on youth study

Add k-means cluster labels as a new (last) column back in the original dataset.

To investigate the gender distribution within different clusters we may use aggregate().

figure af

Here clusters is the new vector indicating cluster labels. The gender distribution does not vary much between different cluster labels (Fig. 13.14).

Fig. 13.14
figure 14

Live demo: k-means point clustering

This k-means live demo shows point clustering (Applies Multiclass AdaBoost.M1, SAMME and Bagging algorithm) http://olalonde.github.com/kmeans.js.

13.7 Hierarchical Clustering

There are a number of R hierarchical clustering packages, including:

  • hclust in base R.

  • agnes in the cluster package.

Alternative distance measures (or linkages) can be used in all Hierarchical Clustering, e.g., single, complete and ward.

We will demonstrate hierarchical clustering using case-study 1 (Divorce and Consequences on Young Adults). Pre-set k = 3 and notice that we have to use normalized data for hierarchical clustering.

figure ag

You can generate the hierarchical plot by ggdendrogram in the package ggdendro (Figs. 13.15 and 13.16).

figure ah
Fig. 13.15
figure 15

Hierarchical clustering using the Ward method

Fig. 13.16
figure 16

Ten-level hierarchical clustering using the Ward method

figure ai

Generally speaking, the best result should come from wald linkage, but you should also try complete linkage (method = ‘complete’). We can see that the hierarchical clustering result (average silhouette value ∼0.24) mostly agrees with the prior k-means (0.2) and k-means++ (0.2) results (Fig. 13.17).

Fig. 13.17
figure 17

Silhouette plot for hierarchical clustering using the Ward method

figure aj

13.8 Gaussian Mixture Models

More details about Gaussian mixture models (GMM) are provided in the supporting materials online. Below is a brief introduction to GMM using the Mclust function in the R package mclust.

For multivariate mixture, there are totally 14 possible models:

  • "EII" = spherical, equal volume

  • "VII" = spherical, unequal volume

  • "EEI" = diagonal, equal volume and shape

  • "VEI" = diagonal, varying volume, equal shape

  • "EVI" = diagonal, equal volume, varying shape

  • "VVI" = diagonal, varying volume and shape

  • "EEE" = ellipsoidal, equal volume, shape, and orientation

  • "EVE" = ellipsoidal, equal volume and orientation (*)

  • "VEE" = ellipsoidal, equal shape and orientation (*)

  • "VVE" = ellipsoidal, equal orientation (*)

  • "EEV" = ellipsoidal, equal volume and equal shape

  • "VEV" = ellipsoidal, equal shape

  • "EVV" = ellipsoidal, equal volume (*)

  • "VVV" = ellipsoidal, varying volume, shape, and orientation

For more practical details, you may refer to Mclust. For more theoretical details, see C. Fraley and A. E. Raftery (2002).

Let’s use the Divorce and Consequences on Young Adults dataset for a demonstration.

figure ak

Thus, the optimal model here is "EEE" (Figs. 13.18, 13.19, and 13.20).

figure al
Fig. 13.18
figure 18

Bayesian information criterion plots for different GMM classification models for the divorce youth data

figure am
Fig. 13.19
figure 19

Pairs plot of the GMM clustering density

figure an
Fig. 13.20
figure 20

Pairs plot of the GMM classification results

13.9 Summary

  • k-means clustering may be most appropriate for exploratory data analytics. It is highly flexible and fairly efficient in terms of tessellating data into groups.

  • It can be used for data that has no Apriori classes (labels).

  • Generated clusters may lead to phenotype stratification and/or be compared against known clinical traits.

Try to use these techniques with other data from the list of our Case-Studies.

13.10 Assignments: 13. k-Means Clustering

Use the Amyotrophic Lateral Sclerosis (ALS) dataset. This case-study examines the patterns, symmetries, associations and causality in a rare but devastating disease, amyotrophic lateral sclerosis (ALS). A major clinically relevant question in this biomedical study is: What patient phenotypes can be automatically and reliably identified and used to predict the change of the ALSFRS slope over time?. This problem aims to explore the data set by unsupervised learning.

  • Load and prepare the data.

  • Perform summary and preliminary visualization.

  • Train a k-means model on the data, select k

  • as we mentioned in Chap. 13.

  • Evaluate the model performance and report the center of clusters and silhouette plots. Explain details (Note: Since we have 100 dimensions, it may be difficult to use bar plots, so show the centers only).

  • Tune parameters and plot with k-means++.

  • Rerun the model with optimal parameters and interpret the clustering results.

  • Apply Hierarchical Clustering on three different linkages and compare the corresponding Silhouette plots.

  • Fit a Gaussian mixture model, select the optimal model and draw BIC and Silhouette plots. (Hint, you need to sample part of data or it could be very time consuming).

  • Compare the result of the above methods.