Book Image

Mastering Python for Data Science

By : Samir Madhavan
Book Image

Mastering Python for Data Science

By: Samir Madhavan

Overview of this book

Table of Contents (19 chapters)
Mastering Python for Data Science
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
7
Estimating the Likelihood of Events
Index

Hierarchical clustering


Hierarchical clustering is an unsupervised learning technique where a hierarchy of clusters is built out of observations.

This clustering groups data at various levels of a cluster tree or dendrogram. It is not a single set of clusters, but a hierarchy of multiple levels where clusters at a particular level are joined as clusters on the next level. This allows you to decide the level of clustering that is most suitable.

The hierarchical clusters essentially are of two types:

  • Agglomerative hierarchical clustering: This is a bottom-up method where each observation starts in its own cluster and two other clusters as they go up a hierarchy

  • Divisive hierarchical clustering: This is a top-down approach where observations start off in a single cluster and then they are split into two as they go down a hierarchy

The following image shows Agglomerative and Divisive hierarchical clustering:

Hierarchical clustering will be explained in more detail in later chapters.