In this video, I tried to perform hierarchical clustering using sklearn's wine dataset. Hierarchical clustering is a method of cluster analysis that tries to build a hierarchy of clusters. the hierarchy of clusters is represented as a tree (dendrogram). I selected only a few dominant features for performing the clustering operation. Hierarchical clustering is an unsupervised learning technique. But, I calculated some external validation indices in this tutorial as the wine dataset comes with references (ground truths) to determine the goodness of the result.
GitHub address: https://github.com/randomaccess2023/M...
For details on skelarn's wine dataset, check this link: https://scikit-learn.org/stable/modul...
For more details on hierarchical clustering, check this out: https://scikit-learn.org/stable/modul...
Description:
00:47 Import the required libraries
02:24 Load 'wine' dataset
03:35 Create a dataframe
05:36 Select some dominant features
10:20 Perform preprocessing
11:08 Scaled dataframe
13:26 Perform 'hierarchical clustering' with 3 clusters
14:41 Add two new columns to the scaled dataframe
16:50 Clustering comparison between ground truths and predictions
21:35 Measure a few external validation metrics
#datascience #hierarchicalclustering #sklearnwinedataset #jupyternotebook #python