Share this post

### In this post, we are going in deep with clustering algorithms in Machine Learning.

### Contents discussed in this Post

- What is mean by Clustering in Machine Learning?
- Different Types of Clustering Algorithms in Machine Learning
- Types of distances to be learned for a clear understanding of clustering
- Implementation of K-Means Clustering Algorithm in Python
- Real-time Applications of Clustering in Daily life

### 1. What is mean by Clustering in Machine Learning?

Clustering is the process of dividing total items into a set of groups. This means each set represents a particular label or characteristics.

Image Courtesy of Unsplash

Clustering is an unsupervised learning algorithm in Machine Learning and they deal with unlabelled data points.

### 2. Different Types of Clustering Algorithms in Machine Learning

There are a total of seven major clustering algorithms that can be used in handling unlabelled data in Machine Learning. They are

- K means clustering
- Hybrid Clustering
- Model-based clustering
- Partitioning clustering

### 3. Types of Distances to be learning for Clustering

All clustering algorithms in Machine Learning are based on the distance between two data points. Firstly there will k cluster points in-plane, for every new point distance is measured between all those pairs.

For point, which gives the minimum distance labeled with that minimum distance point.

Image Courtesy of Wikipedia

Types of distances used Machine Learning for clustering

- Hamming distance
- Euclidean distance
- Manhattan Distance
- Minkowski Distance

### 4. Implementation of K means Clustering Algorithm in Python

Let we get into Algorithmic implementation of K means clustering algorithm

#### Algorithm:

- Read dataset and divide it into a dependent and independent variable
- Importing basic and necessary libraries for k means clustering
- Applying Feature scaling technique to normalize data points
- Performing Elbow Method to get exact number Clusters (k value) possible for given data
- Visualization of Clusters

#### Implementation in Python

1. Dataset Download

In this example, we are going to cluster mall customers into a set of groups based on their purchase history. Use the

**mallcustomers.csv**in the dataset for this project.2. Google Colab

If you don't have a python environment, then use free online google powered computing notebook. Use the link given in the Menu option to access google colab or you can use the following to access it.

3. Clustering Algorithm Development

The following is code for k means clustering algorithm developed using python

### 5. Real-time Applications of Clustering

Real-time Applications of Clustering in Machine Learning

- Banking Industry
- Ecommerce Industry
- Gmail services
- Fake News detection
- Digital Marketing

#### 1. Banking Industry

The banking industry uses clustering in most effective way from loan sanction to offers rolling out to particular customers.

Image Courtesy of Pikist

- Used In credit Card Approval - Based on the history of financial data, the bank forms clusters of approval and non-approval candidates and allocates according to it.
- Used in Loan Amount limits - Based on their previous purchases bank forms clusters of amounts to be granted for customers.
- Offer to a particular Customers - As we can see, banks give some special offers to particular persons based on a clustering approach used in offers.

#### 2. ECommerce Applications

In eCommerce platforms, customers are grouped into sets and particular benefits and offers are rolled out to a group of members.

- Giving offers to a group of customers
- Categorizing user - users are classified as basic, member, and platinum.
- Discounts on purchases - giving personalized discounts in purchase

Image Courtesy of Pixabay

#### 3. Gmail Services

Gmail used a clustering algorithm to categorize SPAM/ Non- SPAM emails based on previous data.

#### 4. Fake News detection

In the Fake news detection process, clustering really helps to categorize the news into text with corresponding labels.

Image Courtesy of Pixabay

#### 5. Digital Marketing

In digital marketing. for a target ad system clustering really helps to reach exact audience. This is a major algorithm used in the Digital Marketing platform for product or service promotion.

Thank you for your timeðŸ¤©ðŸ¤©

Contact us if you have any queries !!

## Comments

## Post a Comment