Member-only story

Hierarchical Clustering in Python

Step-by-step follow along | Data Series | Episode 8.4

Mazen Ahmed
4 min readJan 1, 2021

Please consider reading Episode 8.1 if you are new to clustering algorithms.

An explanation of the Hierarchical clustering algorithm: Episode 8.3

How to set up your programming environment can be found at the start of :
Episode 4.3

You can view and use the code and data used in this episode here: Link

Objective

(We will be working with the same dataset as Ep8.2 but will now work with 3 variables instead of 2)

Place the following data taken from iris plants into clusters to see if we can identify different plants given their sepal length, petal length and petal width.

https://commons.wikimedia.org/wiki/Main_Page

Importing and exploring our Data

import pandas as pd #using pandas library to import data

# save data under variable name Iris_data
Iris_data =…

--

--

Mazen Ahmed
Mazen Ahmed

No responses yet