Use-Cases of K-Means Clustering

In this blog, first of all we will see what is K-Means Clustering Algorithm and then discuss about some of it’s Industry use-cases.

K-Means Clustering:-

Unsupervised learning is a type of machine learning in which models are trained using unlabeled dataset and are allowed to act on that data without any supervision. Unsupervised learning cannot be directly applied to a regression or classification problem because unlike supervised learning, we have the input data but no corresponding output data. The goal of unsupervised learning is to find the underlying structure of dataset, group that data according to similarities, and represent that dataset in a compressed format.

K-Means Clustering is an Unsupervised Learning algorithm, which groups the unlabeled dataset into different clusters. Here K defines the number of pre-defined clusters that need to be created in the process, as if K=2, there will be two clusters, and for K=3, there will be three clusters, and so on. It is an iterative algorithm that divides the unlabeled dataset into k different clusters in such a way that each dataset belongs only one group that has similar properties. It allows us to cluster the data into different groups and a convenient way to discover the categories of groups in the unlabeled dataset on its own without the need for any training.

It is a centroid-based algorithm, where each cluster is associated with a centroid. The main aim of this algorithm is to minimize the sum of distances between the data point and their corresponding clusters.

The algorithm takes the unlabeled dataset as input, divides the dataset into k-number of clusters, and repeats the process until it does not find the best clusters. The value of k should be predetermined in this algorithm.

The k-means clustering algorithm mainly performs two tasks:

  • Determines the best value for K center points or centroids by an iterative process.
  • Assigns each data point to its closest k-center. Those data points which are near to the particular k-center, create a cluster.

Hence each cluster has datapoints with some commonalities, and it is away from other clusters.

The below diagram explains the working of the K-means Clustering Algorithm:

The way K-means algorithm works is as follows:

  1. Specify number of clusters K.
  2. Initialize centroids by first shuffling the dataset and then randomly selecting K data points for the centroids without replacement.
  3. Keep iterating until there is no change to the centroids. i.e assignment of data points to clusters isn’t changing.
  • Compute the sum of the squared distance between data points and all centroids.
  • Assign each data point to the closest cluster (centroid).
  • Compute the centroids for the clusters by taking the average of the all data points that belong to each cluster.

Some of real use-cases of K-Means Clustering in Security domain are as follows:-

Identifying crime localities:-

With data related to crimes available in specific localities in a city, the category of crime, the area of the crime, and the association between the two can give quality insight into crime-prone areas within a city or a locality.

Insurance fraud detection:-

Machine learning has a critical role to play in fraud detection and has numerous applications in automobile, healthcare, and insurance fraud detection. utilizing past historical data on fraudulent claims, it is possible to isolate new claims based on its proximity to clusters that indicate fraudulent patterns. since insurance fraud can potentially have a multi-million dollar impact on a company, the ability to detect frauds is crucial.

Cyber-profiling criminals:-

Cyber-profiling is the process of collecting data from individuals and groups to identify significant co-relations. the idea of cyber profiling is derived from criminal profiles, which provide information on the investigation division to classify the types of criminals who were at the crime scene.

Automatic clustering of it alerts:-

Large Enterprise IT infrastructure technology components such as network, storage, or database generate large volumes of alert messages because alert messages potentially point to operational issues, they must be manually screened for prioritization for downstream processes.

Sorting sensor measurements:-

  • Detect activity types in motion sensors
  • Group images
  • Separate audio
  • Identify groups in health monitoring

Detecting bots or anomalies:-

  • Separate valid activity groups from bots
  • Group valid activity to clean up outlier detection

Thanks for reading!!

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

🏹Definitive Formulas To Become Data Scientist | Part 1 / 3

Feature Selection in Scikit-learn

How to Use Causal Inference in Day-to-Day Analytical Work— Part 2 of 2

Kernel Density Plot

Multiple Time Series Forecast & Demand Pattern Classification using R — Part 3

AeroSim #1 | A Data Science Project & Game Worth Sharing

Choose Maps for Equity

Why to opt for the very bestmattress https://t.co/SJMudqqyia

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aditya Pande

Aditya Pande

More from Medium

Using Survival Algorithms In Churn Analysis On Telecommunication

Asset Correlation analysis

K Means ++ Clustering on Amazon Fine Food Reviews

Calibrating Classifiers in Reality