Hierarchical Clustering intuition

Krish Naik · Beginner ·📐 ML Fundamentals ·7y ago

Key Takeaways

Explains the intuition behind hierarchical clustering

Full Transcript

hello on today we'll be discussing about a little nuclear strength intuition try to understand what is the maths behind I do plus true sorry hi little crust room in a previous video we have already seen something about k-means clustering algorithm but in this particular video we'll try to understand what some mats behind hide it'll last row and Heinkel clustering is one of the very good son supervised machine that works similar to a k-means clustering only the technique is completely addition so this is my high school West Wing all these things so this is my husband Russ tree now for this high school question how it works is that they said that this is my unsupervised machine learning technique this is the answer for a machine so initially I will be having some points so this point suppose I marketed them this black points right now you can see that I just have six points over here now what does what does it happen with respect to the six points you had chemistry first of all you try to find out each and every points are basically specified as different clusters energy so these all are different clusters now what will happen is that we've tried to find out the two nearest point or the two nearest cluster in this since we are considering each and every point as a single question so suppose these two points are with interest and this two points won't specify in the right hand side and another diagram which is called as dendogram so this is basically called as dendogram in the dendogram in the x axis I have points and the y axis I have distance now if I am considering this two point and I named it as p1 and p2 so pasa fighter of p1 and p2 and suppose the distance between this is point five what I am going to do is that I'm going to combine this and this will be fight so this is one type of dendogram that we have created for p1 and p2 then after that we try to find out the distance between this cluster and this point and try to find out which are the next me respond and from that I found out that it's to our than this point and here I get to specify this as e3 and peace right so what I'm going to do is that I'm going to define my another point that is e 3 and E 4 and suppose this distance is somewhere on one so I'm going to combine this and this distance will be now currently I've got two groups still there points and this again we have found out that these are the next nearest one so suppose I make it as e 5 P 6 then again I will be having something like C 5 and P 6 suppose I calculate the distance somewhere here it is coming around 1.5 I have combined this then finally I'll try to find out which will be the nearest clusters to this and suppose I found out that these two clusters are very very near what I'm going to do we're going to combine these two clusters where I have points like III p4 p5 pieces I can combine this together like this where my distance is actually do finally I'll combine this whole group as one cluster where I'll include B 1 and B 2 because these are my next nearest one suppose this 2.5 this p1 p2 will get connected here so this is how my dendogram looks like right but what is the main aims just remember guys this is an unsupervised machine learning technique and our main aim is to basically find out at what should be the exact number of clusters should I use in order to classify my point properly not classify instead group my parents properly the clustering works basically on the similarity of the treated similarity of the data is basically then we are calculating over here with respect to the distance and this distance is measured by something called as euclidean distance in my previous video also have disciplined about Euclidean distance this formula is basically given by if I have two points x1 y1 and x2 y2 I can give I can give it by square root of x2 minus x1 holster plus y2 minus y1 whole square so this will be the distance between two points p1 and p2 which represent your device 1 y1 and x2 right now the next thing is that how can I find out the number of exact clusters that I need to classify this problem so there is a simple hack that is used this hack is nothing that we need to find out how many groups we need to find out the longest vertical line such that none of the horizontal line passes through so I can't consider this particular line because there is a horizontal line that passes through this particular point similarly I can't consider this line also because there is a horizontal line passing through this point ok so similarly I can't consider this I can consider this I can't consider this also because there is a horizontal line I can consider this particular line because this may be the longest line compared to all the others what I do is that I'll draw a straight line that passes through this particular point and I'll try to see how many points it is passing so there are two points that is it is passing through so I can specify that the number of clusters that I can use for this problem is basically and this is the hack basically used for removal then this is just a rough diagram your clusters may also get changed to 3 that depends love how many points that is passing as soon as I find out the longest rotatory and once I am able to do this I will use an a scalar and try to use this at the clustering and I'll be able to group this whole data into two questions based on Similac based on euclidean distance so this was the whole idea about hiatal clustering I hope you like this particular video guys and please subscribe the channel if you have not already done and keep learning I'll see you up in the next video thank you one and all have a great day

Original Description

Here is a detailed discussion where we understand the intuition behind Hierarchical Clustering. You can buy my book where I have provided a detailed explanation of how we can use Machine Learning, Deep Learning in Finance using python Packt url : https://prod.packtpub.com/in/big-data-and-business-intelligence/hands-python-finance Amazon url: https://www.amazon.com/Hands-Python-Finance-implementing-strategies-ebook/dp/B07Q5W7GB1/ref=sr_1_1?keywords=Krish+naik&qid=1554285070&s=gateway&sr=8-1-spell
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Krish Naik · Krish Naik · 31 of 60

1 Natural Language Processing|Stemming
Natural Language Processing|Stemming
Krish Naik
2 Natural Language Processing|BagofWords
Natural Language Processing|BagofWords
Krish Naik
3 Gaussian distribution or Normal Distribution in statisctics
Gaussian distribution or Normal Distribution in statisctics
Krish Naik
4 Natural Language Processing|TF-IDF for Machine Learning| Text Prerocessing
Natural Language Processing|TF-IDF for Machine Learning| Text Prerocessing
Krish Naik
5 Log Normal Distribution in Statistics
Log Normal Distribution in Statistics
Krish Naik
6 Covariance in Statistics
Covariance in Statistics
Krish Naik
7 Confusion matrix, Precision, Recall| Data Science Interview questions
Confusion matrix, Precision, Recall| Data Science Interview questions
Krish Naik
8 Tutorial 44-Balanced vs Imbalanced Dataset and how to handle Imbalanced Dataset
Tutorial 44-Balanced vs Imbalanced Dataset and how to handle Imbalanced Dataset
Krish Naik
9 Implementing a Spam classifier in python| Natural Language Processing
Implementing a Spam classifier in python| Natural Language Processing
Krish Naik
10 Tutorial 11-Exploratory Data Analysis(EDA) of Titanic dataset
Tutorial 11-Exploratory Data Analysis(EDA) of Titanic dataset
Krish Naik
11 Face Recognition using open CV and VGG 16 Transfer Learning
Face Recognition using open CV and VGG 16 Transfer Learning
Krish Naik
12 Pedestrian Detection using OpenCV from Videos
Pedestrian Detection using OpenCV from Videos
Krish Naik
13 Face and Eye Detection from Videos using HAAR Cascade Classifier
Face and Eye Detection from Videos using HAAR Cascade Classifier
Krish Naik
14 Reading, Writing and Displaying images with Opencv| OpenCV Tutorial
Reading, Writing and Displaying images with Opencv| OpenCV Tutorial
Krish Naik
15 OpenCV Installation | OpenCV tutorial
OpenCV Installation | OpenCV tutorial
Krish Naik
16 Face and Eye Detection from Images using HAAR Cascade Classifier
Face and Eye Detection from Images using HAAR Cascade Classifier
Krish Naik
17 Car Detection using HAAR Cascade and Opencv from Videos.
Car Detection using HAAR Cascade and Opencv from Videos.
Krish Naik
18 Using OpenFace for Face recognition in Keras
Using OpenFace for Face recognition in Keras
Krish Naik
19 OpenPose Tutorial with Tensorflow
OpenPose Tutorial with Tensorflow
Krish Naik
20 Multiple Linear Regression using python and sklearn
Multiple Linear Regression using python and sklearn
Krish Naik
21 Dimensional Reduction| Principal Component Analysis
Dimensional Reduction| Principal Component Analysis
Krish Naik
22 Movie Recommender System using Python
Movie Recommender System using Python
Krish Naik
23 TPR,FPR,FNR,TNR, Confusion Matrix
TPR,FPR,FNR,TNR, Confusion Matrix
Krish Naik
24 Precision, Recall and F1-Score
Precision, Recall and F1-Score
Krish Naik
25 Artificial Neural Network for Customer's Exit Prediction from Bank
Artificial Neural Network for Customer's Exit Prediction from Bank
Krish Naik
26 GridSearchCV- Select the best hyperparameter for any Classification Model
GridSearchCV- Select the best hyperparameter for any Classification Model
Krish Naik
27 RandomizedSearchCV- Select the best hyperparameter for any Classification Model
RandomizedSearchCV- Select the best hyperparameter for any Classification Model
Krish Naik
28 K Nearest Neighbor classification with Intuition and practical solution
K Nearest Neighbor classification with Intuition and practical solution
Krish Naik
29 K Means Clustering Intuition
K Means Clustering Intuition
Krish Naik
30 Create custom Alexa Skill- Lambda function- Part2
Create custom Alexa Skill- Lambda function- Part2
Krish Naik
Hierarchical Clustering intuition
Hierarchical Clustering intuition
Krish Naik
32 Implement Transfer Learning with a generic Code Template
Implement Transfer Learning with a generic Code Template
Krish Naik
33 Gender Classifier and Age Estimator using Resnet Convolution Neural Network
Gender Classifier and Age Estimator using Resnet Convolution Neural Network
Krish Naik
34 Unlock Your Application With Your Face using OpenCV
Unlock Your Application With Your Face using OpenCV
Krish Naik
35 Draw rectangle from webcam and sketch process it on a live feed
Draw rectangle from webcam and sketch process it on a live feed
Krish Naik
36 Complete Life Cycle of a Data Science Project
Complete Life Cycle of a Data Science Project
Krish Naik
37 How we can apply Machine Learning in Finance
How we can apply Machine Learning in Finance
Krish Naik
38 Deep Learning in Medical Science
Deep Learning in Medical Science
Krish Naik
39 How to switch your career to Data Science.
How to switch your career to Data Science.
Krish Naik
40 Linear Regression Mathematical Intuition
Linear Regression Mathematical Intuition
Krish Naik
41 Handle Categorical features using Python
Handle Categorical features using Python
Krish Naik
42 Machine Learning Algorithm- Which one to choose for your Problem?
Machine Learning Algorithm- Which one to choose for your Problem?
Krish Naik
43 DBSCAN Clustering Easily Explained with Implementation
DBSCAN Clustering Easily Explained with Implementation
Krish Naik
44 Curse of Dimensionality Easily explained| Machine Learning
Curse of Dimensionality Easily explained| Machine Learning
Krish Naik
45 Feature Selection Techniques Easily Explained | Machine Learning
Feature Selection Techniques Easily Explained | Machine Learning
Krish Naik
46 Tutorial 29-R square and Adjusted R square Clearly Explained| Machine Learning
Tutorial 29-R square and Adjusted R square Clearly Explained| Machine Learning
Krish Naik
47 Cross Validation using sklearn and python | Machine Learning
Cross Validation using sklearn and python | Machine Learning
Krish Naik
48 Handling Missing Data Easily Explained| Machine Learning
Handling Missing Data Easily Explained| Machine Learning
Krish Naik
49 Deploy Machine Learning Model using Flask
Deploy Machine Learning Model using Flask
Krish Naik
50 Deployment of Deep Learning Model using Flask
Deployment of Deep Learning Model using Flask
Krish Naik
51 How to Visualize Multiple Linear Regression in python
How to Visualize Multiple Linear Regression in python
Krish Naik
52 K Nearest Neighbour Easily Explained with Implementation
K Nearest Neighbour Easily Explained with Implementation
Krish Naik
53 Predicting Heart Disease using Machine Learning
Predicting Heart Disease using Machine Learning
Krish Naik
54 Predicting Lungs Disease using Deep Learning
Predicting Lungs Disease using Deep Learning
Krish Naik
55 Stock Sentiment Analysis using News Headlines
Stock Sentiment Analysis using News Headlines
Krish Naik
56 Random Forest(Bootstrap Aggregation) Easily Explained
Random Forest(Bootstrap Aggregation) Easily Explained
Krish Naik
57 Voting Classifier(Hard Voting and Soft Voting Classifier)
Voting Classifier(Hard Voting and Soft Voting Classifier)
Krish Naik
58 Credit Card Fraud Detection using Machine Learning from Kaggle
Credit Card Fraud Detection using Machine Learning from Kaggle
Krish Naik
59 Hyperparameter Optimization for Xgboost
Hyperparameter Optimization for Xgboost
Krish Naik
60 Tutorial 45-Handling imbalanced Dataset  using python- Part 1
Tutorial 45-Handling imbalanced Dataset using python- Part 1
Krish Naik

Related Reads

📰
Python for Data Science — Sampling and Why Your Conclusions Can Be Wrong
Learn how sampling affects data science conclusions and why understanding probability distributions is crucial
Medium · Machine Learning
📰
From a Student Project to an ICML Spotlight
Learn how a student project can lead to an ICML spotlight and understand the importance of efficient GPU computing in machine learning research
Medium · Machine Learning
📰
Queue Position Estimation Under Partial Order Book Visibility for a Polymarket Trading bot
Learn to estimate queue position under partial order book visibility for a Polymarket trading bot and improve trading performance
Dev.to · Mateosoul
📰
AI Training Data Services: The Complete Enterprise Guide to Building Accurate AI Models (2026)
Learn how to build accurate AI models with the right training data services for your enterprise, and why it matters for AI success
Medium · Machine Learning
Up next
Dropout in Deep Learning
AnuTech-CH
Watch →